From e7325b23c4dbb24518c33ed2d61657ae49e04c00 Mon Sep 17 00:00:00 2001 From: henrygd Date: Tue, 23 Sep 2025 20:15:42 -0400 Subject: [PATCH] simplify filter bar component --- .../site/src/components/routes/system.tsx | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/internal/site/src/components/routes/system.tsx b/internal/site/src/components/routes/system.tsx index 35ee75fe..700898ad 100644 --- a/internal/site/src/components/routes/system.tsx +++ b/internal/site/src/components/routes/system.tsx @@ -938,24 +938,22 @@ function GpuEnginesChart({ chartData }: { chartData: ChartData }) { function FilterBar({ store = $containerFilter }: { store?: typeof $containerFilter }) { const containerFilter = useStore(store) const { t } = useLingui() - const inputRef = useRef(null) - const debouncedStoreSet = useMemo(() => debounce((value: string) => store.set(value), 150), [store]) + const debouncedStoreSet = useMemo(() => debounce((value: string) => store.set(value), 80), [store]) const handleChange = useCallback( - (e: React.ChangeEvent) => { - const value = e.target.value - if (inputRef.current) { - inputRef.current.value = value - } - debouncedStoreSet(value) - }, + (e: React.ChangeEvent) => debouncedStoreSet(e.target.value), [debouncedStoreSet] ) return ( <> - + {containerFilter && (