diff --git a/frontend/app/components/Highlights/HighlightsList.tsx b/frontend/app/components/Highlights/HighlightsList.tsx index ffb328d10..da4aee141 100644 --- a/frontend/app/components/Highlights/HighlightsList.tsx +++ b/frontend/app/components/Highlights/HighlightsList.tsx @@ -42,13 +42,18 @@ function HighlightsList() { retry: 3 }); const { total, notes } = data; + const debounceTimeout = React.useRef(0); const onSearch = (value: string) => { notesStore.setQuery(value); }; const handleInputChange = (e: React.ChangeEvent) => { - notesStore.setQuery(e.target.value); + const value = e.target.value; + if (debounceTimeout.current) clearTimeout(debounceTimeout.current); + debounceTimeout.current = window.setTimeout(() => { + notesStore.setQuery(value); + }, 500); }; const toggleTag = (tag?: iTag) => { diff --git a/frontend/app/components/Highlights/HighlightsListHeader.tsx b/frontend/app/components/Highlights/HighlightsListHeader.tsx index e67ad530e..f909868f3 100644 --- a/frontend/app/components/Highlights/HighlightsListHeader.tsx +++ b/frontend/app/components/Highlights/HighlightsListHeader.tsx @@ -79,7 +79,7 @@ function HighlightsListHeader({