Skip to content

Commit

Permalink
Reverts nodejs#6478 - removes debounce on search (nodejs#6497)
Browse files Browse the repository at this point in the history
* reverts nodejs#6478 - removes debounce on search

* fixes style
  • Loading branch information
micheleriva committed Mar 20, 2024
1 parent a4f6802 commit ae66dd2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/Common/Search/States/WithSearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { useRouter } from '@/navigation.mjs';
import { DEFAULT_ORAMA_QUERY_PARAMS } from '@/next.constants.mjs';
import { search as oramaSearch, getInitialFacets } from '@/next.orama.mjs';
import type { SearchDoc } from '@/types';
import { debounce } from '@/util/debounce';

type Facets = { [key: string]: number };

Expand Down Expand Up @@ -72,7 +71,7 @@ export const WithSearchBox: FC<SearchBoxProps> = ({ onClose }) => {

useEffect(
() => {
debounce(() => search(searchTerm), 1000)();
search(searchTerm);
},
// we don't need to care about memoization of search function
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit ae66dd2

Please sign in to comment.