emoji-picker-react icon indicating copy to clipboard operation
emoji-picker-react copied to clipboard

Question: search on enter to select the first emoji

Open nadeemkhedr opened this issue 1 year ago • 3 comments

Love this plugin! Excited for v4

As a user, when I am filtering the emoji, and click enter, I would like to select the top-left emoji in the list

This doesn't look possible from the current API, just wanted to make sure I am not missing something

I can think of two possible solutions

  • another flag, enableOnEnterSelectFirstEmoji (or something like that)
  • or a custom onFilter that will get the key that the user clicked on and the list of visible emoji and its up to the developer to do the logic

nadeemkhedr avatar Sep 07 '22 05:09 nadeemkhedr

Hey @nadeemkhed, thanks for the feedback. Glad that you're enjoying the picker.

This sounds like a very useful feature to have.

Please, allow me to iterate on it and get back to you with a solution maybe today or tomorrow.

ealush avatar Sep 07 '22 06:09 ealush

As you suggested, this improves the overall usability of the picker. I like it. I incorporated your suggestion into the next major version preview. You can see it live here: https://codesandbox.io/s/floral-rgb-z2gkzp?file=/src/App.tsx

ealush avatar Sep 11 '22 18:09 ealush

This is fantastic! You are awesome <3

nadeemkhedr avatar Sep 11 '22 19:09 nadeemkhedr

Implemented in v4, closing this. Thanks for helping this project be better :)

ealush avatar Sep 25 '22 21:09 ealush