Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The EmojiPicker caches the old onEmojiClick method #400

Open
weiningning opened this issue Feb 28, 2024 · 3 comments
Open

The EmojiPicker caches the old onEmojiClick method #400

weiningning opened this issue Feb 28, 2024 · 3 comments

Comments

@weiningning
Copy link

Hello, I encountered an issue while using the EmojiPicker component:
When the props onEmojiClick of the EmojiPicker component are changed, the EmojiPicker does not update and caches the old onEmojiClick method.
I am expecting the EmojiPicker to use the new onEmojiClick function when the props onEmojiClick are changed.

@ealush
Copy link
Owner

ealush commented Feb 28, 2024

Hi, do you have a reproduction?

I can confirm it used to be an issue. Wondering if it came back due to a regression.

@stonelens
Copy link

I'm encountering a similar issue while using v4.9.2, and I believe it behaves quite the same as the issue #365, the onEmojiClick function cannot access latest component state even I wrap my click handler with a callback hook

@Diegocndd
Copy link

Diegocndd commented Jun 4, 2024

same problem here. any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants