better sort

This commit is contained in:
Philipinho
2026-03-28 11:45:53 +00:00
parent 963ab5d7cb
commit c2b41d72bf
@@ -682,7 +682,11 @@ export const getSuggestionItems = ({
});
if (filteredItems.length) {
filteredGroups[group] = filteredItems;
filteredGroups[group] = filteredItems.sort((a, b) => {
const aTitle = a.title.toLowerCase().includes(search) ? 0 : 1;
const bTitle = b.title.toLowerCase().includes(search) ? 0 : 1;
return aTitle - bTitle;
});
}
}