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

Need a prop to clear the search text on emoji picker close

Open Ashish-Shingala opened this issue 6 months ago • 3 comments

When I search for something in the emoji picker and then select an emoji, the next time I open the emoji picker, the previous search text is still present. I would like the search input to be cleared whenever the emoji picker is closed.

Please provide a prop or method to clear the search text when the emoji picker is closed.

Ashish-Shingala avatar Jun 19 '25 11:06 Ashish-Shingala

I think it would be useful to have some props for controlling the search value. For example, I would like to integrate the picker into a modal with icons, where there is already a custom search field, the value of which I would like to apply here.

AmelianceSkyMusic avatar Jul 02 '25 17:07 AmelianceSkyMusic

Interesting propositions. How would you imagine it? Sort of a controlled value, or more like an imperative api?

ealush avatar Jul 12 '25 21:07 ealush

@ealush A controlled approach sounds great — something like searchValue + onSearchChange so we can reset it when the picker closes. An optional ref.clearSearch() method could also be useful for simpler cases.

Ashish-Shingala avatar Oct 15 '25 03:10 Ashish-Shingala