diff --git a/apps/client/src/features/editor/components/slash-menu/menu-items.ts b/apps/client/src/features/editor/components/slash-menu/menu-items.ts index 7205874d..73b7cc27 100644 --- a/apps/client/src/features/editor/components/slash-menu/menu-items.ts +++ b/apps/client/src/features/editor/components/slash-menu/menu-items.ts @@ -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; + }); } }