fix(core): filters emojipicker on label in addition to tags (#15129)

Fixes #15116 
# Issue
Emojipicker keyword filtering only filtered on `tags`, and not `label`.
So searching for an emoji's name would not result in said emoji ending
up in the result. E.G. searching "sunflower" does not make 🌻 appear

# Solution
Adding an extra condition to the filter function to check if the keyword
is a substring of an emoji's label

# Result
Search results now include emojis with that `label`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Improved emoji picker search to include matches on both emoji labels
and tags (case-insensitive), enabling broader search results for better
discoverability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Tines Valen
2026-06-18 16:07:27 +02:00
committed by GitHub
parent 766219d4e1
commit e2624d93c7
@@ -123,8 +123,12 @@ export const EmojiGroups = memo(function EmojiGroups({
emojiGroupList
.map(group => ({
...group,
emojis: group.emojis.filter(emoji =>
emoji.tags?.some(tag => tag.includes(keyword.toLowerCase()))
emojis: group.emojis.filter(
emoji =>
emoji.label.toLowerCase().includes(keyword.toLowerCase()) ||
emoji.tags?.some(tag =>
tag.toLowerCase().includes(keyword.toLowerCase())
)
),
}))
.filter(group => group.emojis.length > 0)