Opposite of 'onFocus' in React
Asked Answered
A

1

23

I have a scenario where there has to be a event triggered when the input selected goes out of Focus.

There is already a onFocus event trigger when input is focused

<input onFocus={this.callFunction}/>

I need to know if there is an event that can be triggered when the selected input goes out of Focus. I could not find in React forms site

<input outOfFocus={this.callFunction}/>

Any Suggestion on this will be highly appreciated.

Analcite answered 31/5, 2016 at 9:52 Comment(0)
E
45

There is event onBlur

<input onBlur={this.callFunction} />
Epi answered 31/5, 2016 at 9:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.