mirror of
https://github.com/flarum/framework.git
synced 2025-01-21 17:55:33 +08:00
Improve emoji suggestion sorting
Not sure why emoji suggestions were being sorted by the length of their name... Reverting this means that exact matches are displayed at the top again which is good.
This commit is contained in:
parent
00b3d7b19a
commit
3d0097ea12
|
@ -131,9 +131,7 @@ export default function addComposerAutocomplete() {
|
|||
emoji,
|
||||
name: emojiMap[emoji][0],
|
||||
code: getEmojiIconCode(emoji),
|
||||
})).sort((a, b) => {
|
||||
return a.name.length - b.name.length;
|
||||
}).map(makeSuggestion);
|
||||
})).map(makeSuggestion);
|
||||
|
||||
if (suggestions.length) {
|
||||
dropdown.props.items = suggestions;
|
||||
|
|
Loading…
Reference in New Issue
Block a user