emoji-picker-element icon indicating copy to clipboard operation
emoji-picker-element copied to clipboard

Emoji search returns no results for single letter queries

Open dumptyd opened this issue 3 years ago • 3 comments
trafficstars

This is a necessary feature when implementing something like github's emoji autocomplete dropdown. If there are performance concerns, you can keep this disabled by default and expose a way to modify MIN_SEARCH_TEXT_LENGTH.

dumptyd avatar Nov 02 '22 14:11 dumptyd

Yeah, I can see why you might want this to be configurable. Although it will bloat the size of the database, although I don't know by how much. In any case, it will need to be globally configured since it affects how data is written to IDB.

nolanlawson avatar Nov 08 '22 13:11 nolanlawson

@nolanlawson, I've fixed this issue as setting up min length 0 and changed the condition in picker if this change were needed then review PR here

abdullah4a avatar Dec 16 '22 17:12 abdullah4a

This is a necessary feature when implementing something like github's emoji autocomplete dropdown.

BTW it looks like GitHub's emoji autocomplete works with single-letter queries because it only renders a max of 5 emoji. emoji-picker-element does not have any kind of limit for the results, nor does it do any lazy/virtual rendering, hence the perf issue described here: https://github.com/nolanlawson/emoji-picker-element/pull/298#discussion_r1051439420

nolanlawson avatar Dec 17 '22 18:12 nolanlawson