From 7c1d237222aa154b860158d5fdbed7aa0ea0d444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 26 Nov 2024 19:44:18 +0100 Subject: [PATCH] pl-fe: do not autosubmit search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/features/search/components/search.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/pl-fe/src/features/search/components/search.tsx b/packages/pl-fe/src/features/search/components/search.tsx index e0ea79b21..2db84c064 100644 --- a/packages/pl-fe/src/features/search/components/search.tsx +++ b/packages/pl-fe/src/features/search/components/search.tsx @@ -1,6 +1,5 @@ import clsx from 'clsx'; -import debounce from 'lodash/debounce'; -import React, { useCallback, useState } from 'react'; +import React, { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useSearchParams } from 'react-router-dom-v5-compat'; @@ -21,15 +20,10 @@ const Search = () => { setParams(params => ({ ...Object.fromEntries(params.entries()), q: value })); }; - const debouncedSubmit = useCallback(debounce((value: string) => { - setQuery(value); - }, 900), []); - const handleChange = (event: React.ChangeEvent) => { const { value } = event.target; setValue(value); - debouncedSubmit(value); }; const handleClear = (event: React.MouseEvent) => {