ealush / emoji-picker-react

The most popular React Emoji Picker
https://ealush.com/emoji-picker-react/
MIT License
1.04k stars 171 forks source link

Add programmatic search and imperative API #353

Open daguej opened 1 year ago

daguej commented 1 year ago

This adds a few options that allow you to control the emoji picker programmatically.

I'm building inside a contenteditable editor, and want users to select emojis by typing in the text area. (Similar to how you can press : in slack or github and get a menu of emojis.) Since users are already typing in an input area, I don't want them to have to move to the search field that is rendered inside the emoji picker; I want to supply the characters the user has typed in my editor and use that to filter the results.

This PR supports this use case by adding these options:

You can use these three options together to implement pretty seamless search and keyboard navigation glued to an external UI.

ealush commented 1 year ago

Hey @daguej , thank you so much for taking the time and effort to work on this.

I was abroad this past week, please allow me a few days to go over this change.