fix recent emojis threshold
This commit is contained in:
2 files changed
+11
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
---
|
||||
|
||||
Fix recent emojis ignoring letter threshold.
|
||||
@@ -70,7 +70,12 @@ export function EmoticonAutocomplete({
|
||||
getEmoticonSearchStr,
|
||||
SEARCH_OPTIONS
|
||||
);
|
||||
const autoCompleteEmoticon = result ? result.items.slice(0, 20) : recentEmoji;
|
||||
const autoCompleteEmoticon = useMemo(() => {
|
||||
if (query.text.length < emojiThreshold) {
|
||||
return [];
|
||||
}
|
||||
return result ? result.items.slice(0, 20) : recentEmoji;
|
||||
}, [query.text.length, emojiThreshold, result, recentEmoji]);
|
||||
|
||||
useEffect(() => {
|
||||
if (query.text && query.text.length >= emojiThreshold) {
|
||||
|
||||
Reference in new issue
Block a user