webscopeio / react-textarea-autocomplete

📝 React component implements configurable GitHub's like textarea autocomplete.
MIT License
451 stars 80 forks source link

Add onItemHighlighted prop #192

Closed SamuelBolduc closed 4 years ago

SamuelBolduc commented 4 years ago

Useful for updating other parts of the page in reaction to the highlighted item in the autocomplete dropdown being changed.

In my case I want to reference rows in a table by their name, and when a row's name is highlighted in the autocomplete dropdown I want to highlight the actual row. This PR aims to enable this functionality.

If the name onItemHighlighted doesn't make sense, let me know and we can find a better one, I'll update it.

I also bumped the version to v4.7.0 (minor version bump) since this is more than just a bugfix. Again, I can revert this if you have another methodology to manage versions.

jukben commented 4 years ago

Hey! Thank you so much for your PR!

Here is the playground for this revision 🚀

I hope everything is fine! ❤️

This message has been generated automagically

SamuelBolduc commented 4 years ago

Alright, makes sense. I reverted it back to 4.6.3 like it was before the commit. Thanks!

jukben commented 4 years ago

Released https://github.com/webscopeio/react-textarea-autocomplete/releases/tag/v4.7.0 🚀