From 70a5619496db1620fcc6d0127449ffb498a3dae4 Mon Sep 17 00:00:00 2001 From: Dym Sohin Date: Fri, 18 Sep 2020 11:07:38 +0200 Subject: [PATCH] [fix] case in/sensitive emoji search --- src/components/emoji_picker/emoji_picker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 0f397b59f3..5c09f6ca7b 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -8,7 +8,10 @@ const LOAD_EMOJI_BY = 60 const LOAD_EMOJI_MARGIN = 64 const filterByKeyword = (list, keyword = '') => { - return list.filter(x => x.displayText.includes(keyword)) + const keywordLowercase = keyword.toLowerCase() + return list.filter(emoji => + emoji.displayText.toLowerCase().includes(keywordLowercase) + ) } const EmojiPicker = {