diff --git a/src/routes/EditorLayout.svelte b/src/routes/EditorLayout.svelte index ef91b41..aa58db7 100644 --- a/src/routes/EditorLayout.svelte +++ b/src/routes/EditorLayout.svelte @@ -43,7 +43,7 @@ let configTypeSelector: "profile" | "preset" = "profile"; - let isSearchSortingShows = false; + let isSearchSortingShows = true; async function editorMessageListener(event: MessageEvent) { if (event.data.messageType == "localConfigs") { diff --git a/src/routes/Filter.svelte b/src/routes/Filter.svelte index 9029b31..9314d33 100644 --- a/src/routes/Filter.svelte +++ b/src/routes/Filter.svelte @@ -23,16 +23,18 @@ } let searchSuggestions: string[] = [ + "Profile", + "Preset", "BU16", "EF44", "EN16", "PBF4", "PO16", - "button", - "encoder", - "potentiometer", - "fader", - "system" + "Button", + "Encoder", + "Potentiometer", + "Fader", + "System" ]; enum SortFieldType { @@ -55,11 +57,12 @@ const arrayOfSearchTerms = searchString.trim().toLowerCase().split(" "); const filtered = array.filter((config) => { - const currentProfileSearchable = - config.name.toLowerCase() + " " + config.type.toLowerCase(); + const currentProfileSearchable = String( + `${config.name} ${config.type} ${config.configType}` + ).toLocaleLowerCase(); for (const searchTerm of arrayOfSearchTerms) { - if (currentProfileSearchable.indexOf(searchTerm) === -1) { + if (currentProfileSearchable.indexOf(searchTerm.toLocaleLowerCase()) === -1) { return false; } }