typeahead: Sort exact matches too, in case there are multiple.

This commit is contained in:
N-Shar-ma
2024-01-16 22:26:59 +05:30
committed by Tim Abbott
parent 1a9441ec70
commit b89cd43588

View File

@@ -155,7 +155,7 @@ export function triage<T>(
...beginswithCaseInsensitive, ...beginswithCaseInsensitive,
].sort(sorting_comparator); ].sort(sorting_comparator);
return { return {
matches: [...exactMatch, ...non_exact_sorted_matches], matches: [...exactMatch.sort(sorting_comparator), ...non_exact_sorted_matches],
rest: noMatch.sort(sorting_comparator), rest: noMatch.sort(sorting_comparator),
}; };
} }