address comments

This commit is contained in:
Christine Betts
2026-02-12 15:38:02 -05:00
parent 0b23546fb8
commit cb4cbf8d94
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
*/
@@ -92,8 +92,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;