moroshko / react-autosuggest

WAI-ARIA compliant React autosuggest component
http://react-autosuggest.js.org
MIT License
5.97k stars 585 forks source link

add onFocus to the documentation #668

Open NobodyDies opened 5 years ago

NobodyDies commented 5 years ago

Here was alot of disscussions about that callback, but for all of cases there was a solution, but i think i found reason why this callback is needed.

In my app i try to make material looking component based on autosuggest, but i cant make it because i can't manipulate animation of label element that is outside of autosuggest based on focus or blur.

here an example of animation that i need to implement https://material.angular.io/components/input/overview

I just do not understand why it is not implemented yet - input changes it class based on focus, so there is some logic for that. I just need to have some ability to tell a wrapper that input is focused or not.

NobodyDies commented 5 years ago

actualy - never mind. Just please - put reference to onFocus callback to the documentation. I found it in the code and used it - working fine