Merge branch 'cb/genericlist' into cb/explore

This commit is contained in:
Christine Betts
2026-02-12 15:38:40 -05:00
2 changed files with 6 additions and 4 deletions

View File

@@ -164,7 +164,6 @@ export function SettingsDialog({
});
}, [settingKeys, selectedScope, settings, modifiedSettings, pendingSettings]);
// Use fuzzy search hook
const { filteredItems, searchBuffer, maxLabelWidth } = useFuzzyList({
items,
});

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
@@ -70,8 +70,11 @@ export function useFuzzyList<T extends GenericListItem>({
onSearch?.(searchQuery);
};
// eslint-disable-next-line @typescript-eslint/no-floating-promises
doSearch();
void doSearch().catch((error) => {
// eslint-disable-next-line no-console
console.error('Search failed:', error);
setFilteredKeys(items.map((i) => i.key)); // Reset to all items on error
});
return () => {
active = false;