From 032665404230dabc263e60e4e1289bc19c7b8c5d Mon Sep 17 00:00:00 2001 From: Siarhei Karol Date: Mon, 16 Dec 2024 17:08:31 +0300 Subject: [PATCH] reduce debounce timeout and show status message --- src/common/hooks/useFetchSearchData.ts | 3 +-- src/components/EditSection/EditSection.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/hooks/useFetchSearchData.ts b/src/common/hooks/useFetchSearchData.ts index 7f0712a2..dede8f9b 100644 --- a/src/common/hooks/useFetchSearchData.ts +++ b/src/common/hooks/useFetchSearchData.ts @@ -25,7 +25,7 @@ export const useFetchSearchData = () => { } = useSearchContext(); const { setIsLoading } = useLoadingState(); const { setMessage, data, setData, resetData, setPageMetadata } = useSearchState(); - const { addStatusMessagesItem, resetStatusMessages } = useStatusState(); + const { addStatusMessagesItem } = useStatusState(); const validateAndNormalizeQuery = useCallback( (type: SearchIdentifiers, query: string) => { @@ -133,7 +133,6 @@ export const useFetchSearchData = () => { selectedSegment, baseQuerySelector = SearchableIndexQuerySelector.Query, }: FetchDataParams) => { - resetStatusMessages(); const selectedNavigationSegment = selectedSegment ?? navigationSegment?.value; data && resetData(); diff --git a/src/components/EditSection/EditSection.tsx b/src/components/EditSection/EditSection.tsx index c815fb86..9ce64965 100644 --- a/src/components/EditSection/EditSection.tsx +++ b/src/components/EditSection/EditSection.tsx @@ -14,7 +14,7 @@ import { useInputsState, useProfileState, useStatusState, useUIState } from '@sr import { renderDrawComponent } from './renderDrawComponent'; import './EditSection.scss'; -const USER_INPUT_DELAY = 750; +const USER_INPUT_DELAY = 100; export const EditSection = memo(() => { const { selectedEntriesService } = useServicesContext() as Required;