missive / emoji-mart

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

Filtering emoji without image from search #141

Closed savardc closed 6 years ago

savardc commented 6 years ago

We're having some issues with search results containing emoji with no image.

So far, the only way I found to check if an emoji has an image is to use the has_img* properties on the data returned by getData.

I would be happy to work on a PR but I'm not sure about the best way to fix this?

Any thoughts?

EtienneLem commented 6 years ago

Do you have an example? I was sure this was already handled 🤔

savardc commented 6 years ago

:staff_of_aesculapius: with the emoji-one set. The Emoji component returns null so is not displayed in the search results in the picker but there's no easy way to remove it from the result of the search function

The check for the image is here: https://github.com/missive/emoji-mart/blob/master/src/components/emoji.js#L99

EtienneLem commented 6 years ago

Figured the best way for now would be to provide more data to emojisToShowFilter, just like it does in the Picker component. Preparing v2.2.0 release as we speak.