missive / emoji-mart

πŸͺ One component to pick them all
https://missiveapp.com/open/emoji-mart
MIT License
8.59k stars 826 forks source link

Search bug #327

Closed vesai closed 5 years ago

vesai commented 5 years ago

When you write "fam" in search field you see duplicate key error in console.

Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2019-03-26 Π² 12 58 52

If you continue write "family" you will see more same emoji.

curtiscde commented 5 years ago

From what I can tell this is caused by each emoji not having a unique identifier and instead depending on the first "short name" to produce the id.

id = short_names[0]

https://github.com/missive/emoji-mart/blob/master/src/utils/emoji-index/nimble-emoji-index.js#L26

With the example above both of the emojis (Family & Man Woman Boy) are returning man-woman-boy as the first "short name".