Opposite of 'onFocus' in React

Sijan Shrestha picture Sijan Shrestha · May 31, 2016 · Viewed 10.7k times · Source

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.

Answer

Oleksandr T. picture Oleksandr T. · May 31, 2016

There is event onBlur

<input onBlur={this.callFunction} />