Skip to content

Commit b7d14c0

Browse files
committed
improve: autocomplete top-level keys in useFuzzyFilter while allowing dot paths
Use (Extract<keyof T, string> | (string & {}))[] so editors suggest top-level keys like "key" and "value" while still accepting nested dot-notation paths like "environment.type". https://claude.ai/code/session_01HsDEMADbz1HQmZ4MDD753r
1 parent e9f81e4 commit b7d14c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/webapp/app/hooks/useFuzzyFilter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function useFuzzyFilter<T extends Object>({
2828
keys,
2929
}: {
3030
items: T[];
31-
keys: string[];
31+
keys: (Extract<keyof T, string> | (string & {}))[];
3232
}) {
3333
const [filterText, setFilterText] = useState("");
3434

0 commit comments

Comments
 (0)