Is there an event for leaving the field or loosing focus in the Material UI TextField?
I need two events, one for entering and one for leaving the field. Entering the field can be handled by using onFocus, but is there also one for leaving, i.e. onFocusLost or onUnfocus? The following code segment show the current use, missing the event for loosing focus.
<TextField
value={this.state.fieldFirstName}
onChange={(e: any) => this.onChangeFieldFirstName(e.target.value)}
onFocus={() => this.onFocusFieldFirstName()}
/>
Versions in use:
<TextField
value={this.state.fieldFirstName}
onChange={(e: any) => this.onChangeFieldFirstName(e.target.value)}
onFocus={() => this.onFocusFieldFirstName()}
onBlur={() => this.onBlurField()}/>
Use onBlur event this will solve your problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With