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
@@ -164,7 +164,6 @@ export function SettingsDialog({
}); });
}, [settingKeys, selectedScope, settings, modifiedSettings, pendingSettings]); }, [settingKeys, selectedScope, settings, modifiedSettings, pendingSettings]);
// Use fuzzy search hook
const { filteredItems, searchBuffer, maxLabelWidth } = useFuzzyList({ const { filteredItems, searchBuffer, maxLabelWidth } = useFuzzyList({
items, items,
}); });
+6 -3
View File
@@ -1,6 +1,6 @@
/** /**
* @license * @license
* Copyright 2025 Google LLC * Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -92,8 +92,11 @@ export function useFuzzyList<T extends GenericListItem>({
onSearch?.(searchQuery); onSearch?.(searchQuery);
}; };
// eslint-disable-next-line @typescript-eslint/no-floating-promises void doSearch().catch((error) => {
doSearch(); // eslint-disable-next-line no-console
console.error('Search failed:', error);
setFilteredKeys(items.map((i) => i.key)); // Reset to all items on error
});
return () => { return () => {
active = false; active = false;