diff --git a/src/lib/Components/Consignments/Components/TextInput.tsx b/src/lib/Components/Consignments/Components/TextInput.tsx index 49ab140be5..f108bd80e8 100644 --- a/src/lib/Components/Consignments/Components/TextInput.tsx +++ b/src/lib/Components/Consignments/Components/TextInput.tsx @@ -73,8 +73,18 @@ export default class TextInputField extends React.Component this.setState({ focused: true }, () => this.props.text.onFocus(e))} - onBlur={e => this.setState({ focused: false }, () => this.props.text.onBlur(e))} + onFocus={e => + this.setState( + { focused: true }, + () => this.props.text && this.props.text.onFocus && this.props.text.onFocus(e) + ) + } + onBlur={e => + this.setState( + { focused: false }, + () => this.props.text && this.props.text.onBlur && this.props.text.onBlur(e) + ) + } /> )}