nolanlawson / emoji-picker-element

A lightweight emoji picker for the modern web
https://nolanlawson.github.io/emoji-picker-element/
Apache License 2.0
1.43k stars 82 forks source link

Only use custom emojis #355

Open BoHuny opened 1 year ago

BoHuny commented 1 year ago

Hello,

I wish to remove all native emojis from the picker to only use my custom emojis, is there a way to achieve that? Couldn't quite how to do this in the doc. Thanks in advance

nolanlawson commented 1 year ago

@BoHuny You mean you want to remove the tab bar entirely and only show custom emoji? You could probably accomplish this with a CSS rule to hide the tab bar.

BoHuny commented 1 year ago

Hello! The issue is, if I just hide the tab bar, custom emojis still popup with the research bar, which I still need for my custom emojis. I found a workaround (using own datasource with one single unicode emoji) so I can still work with my use case. You can still change the behavior to remove native emojis if you think other users might have this problem Ty for your help and the library, works very well!

nolanlawson commented 1 year ago

@BoHuny Hmm, maybe you could try using a dataSource that is just an empty JSON array? I think that should remove the native emoji from the search results as well.

BoHuny commented 1 year ago

Hello @nolanlawson The thing is, if I pass an empty array then this error is thrown image It only works when the JSON array contains at least one emoji