Allow for searching unicode emoji via inputting emoji
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

(This is needed for the react menu)
This commit is contained in:
Beefox 2022-09-10 16:36:12 +10:00 committed by David
parent 39b6b0b49f
commit fcbbbad8d4

View file

@ -138,7 +138,7 @@ const EmojiPicker = {
if (this.keyword === '') return list
const regex = new RegExp(escapeRegExp(trim(this.keyword)), 'i')
return list.filter(emoji => {
return regex.test(emoji.displayText)
return (regex.test(emoji.displayText) || (!emoji.imageUrl && emoji.replacement === this.keyword))
})
}
},