NoriginMedia / react-spatial-navigation

DEPRECATED. HOC-based Spatial Navigation. NEW Hooks version is available here: https://github.com/NoriginMedia/norigin-spatial-navigation
MIT License
226 stars 64 forks source link

Create onFocusOut #33

Closed JakubKubista closed 4 years ago

JakubKubista commented 5 years ago

Is your feature request related to a problem? Please describe. The library react-spatial-navigation contains onBecameFocused (which works as JS focus - https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event), but not onFocusOut (oposite). Or maybe better case onFocused, which would returns true/false.

Describe the solution you'd like MDN has this functionality like this: https://developer.mozilla.org/en-US/docs/Web/API/Element/focusout_event

Describe alternatives you've considered Currently we need to use a prop focused from child component A to send it to parent component B, if we want to use this focused property in another component C (included in component A).

asgvard commented 4 years ago

This is now implemented as onBecameBlurred in #59 (for naming convention we already had, which perhaps is not perfect :) ).