mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-14 11:10:29 +03:00
add order algorithm in search result
This commit is contained in:
parent
5844209bee
commit
f73dc05e25
3 changed files with 107 additions and 42 deletions
|
|
@ -64,9 +64,7 @@ export function EmoticonAutocomplete({
|
|||
}, [imagePacks]);
|
||||
|
||||
const [result, search, resetSearch] = useAsyncSearch(searchList, getEmoticonStr, SEARCH_OPTIONS);
|
||||
const autoCompleteEmoticon = (result ? result.items : recentEmoji).sort((a, b) =>
|
||||
a.shortcode.localeCompare(b.shortcode)
|
||||
);
|
||||
const autoCompleteEmoticon = result ? result.items : recentEmoji;
|
||||
|
||||
useEffect(() => {
|
||||
if (query.text) search(query.text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue