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

Can't load custom emojis from an API call. #369

Closed burzumumbra closed 9 months ago

burzumumbra commented 10 months ago

I'm trying to use custom emojis, but only when I load them from a static source it works, there's something I could be missing here?

image
ealush commented 10 months ago

Hmm. I have an assumption, but I am not sure. Can you share a codesandbox with a repro so that I can try to fix the issue?

Thanks!

burzumumbra commented 10 months ago

Hmm. I have an assumption, but I am not sure. Can you share a codesandbox with a repro so that I can try to fix the issue?

Thanks!

Thanks for the fast reply, I'll have to find an alternative for the API, since it's a corporate app I can't expose it in Codesandbox. I'll came back to you after I have all that setup, thanks again.

ealush commented 10 months ago

Sure. Let me know once you have it. In the meantime, if you can just describe what's the flow that's happening, it would help.

I am assuming what you do is something like this:

  1. Mount your app (with the picker)
  2. Fetch some emojis from an API
  3. Add them as a prop

Could you try just to help me debug try something like this:

<Picker customEmojis={emojis} key={`${emojis.length`}`}/>

Does it change anything?

ealush commented 10 months ago

@burzumumbra try 4.5.13. should work

burzumumbra commented 10 months ago

@ealush Sorry for the delay providing the code sample, but thanks for that speed answering to this issue, I'll check that version later today and let you know how it went, thanks.

burzumumbra commented 9 months ago

@ealush Sorry for taking time to reply, v4.5.13 and the key prop did solved.

image
ealush commented 9 months ago

@burzumumbra awesome. Fwiw, should work without the key prop now.