joeattardi / picmo

JavaScript emoji picker. Any app, any framework.
https://picmojs.com
MIT License
1.19k stars 117 forks source link

Feature: Add version option when using default emoji data #243

Closed pabloascarza closed 2 years ago

pabloascarza commented 2 years ago

Can you please add a version parameter to use when using the default option getting the emoji data from emoji base. I check the code and it's already done

https://github.com/joeattardi/picmo/blob/7d7335072b77bed346b7aeaf0cd7cff77e31845e/packages/picmo/src/data/emojiData.ts#L14

just need to pass down the parameter to this.

joeattardi commented 2 years ago

What's the use case?

You can pass the emojiVersion option to limit which emojis are included in the picker and search results.

joeattardi commented 2 years ago

If you build the database with an older emoji version, and you want to use newer emojis later, you'd have to delete the whole database and create it again. Unless there is a scenario I am missing, it's best to have all the data available and just filter on the specified (or autodetected) version.

pabloascarza commented 2 years ago

emojiVersion was what i need, sry closing this

joeattardi commented 2 years ago

No worries, I just wanted to make sure there wasn't a valid use case I was missing. You can see more details on emoji versions here.