From 56908dc77b070cd37d3aefded6b76e3cd7bb395c Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Wed, 9 Apr 2025 14:48:20 -0600 Subject: [PATCH] 45 seconds --- web/src/api/query_keys/search.ts | 2 +- web/src/components/features/modal/AddToCollectionModal.tsx | 2 +- web/src/components/features/modal/AddToDashboardModal.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/api/query_keys/search.ts b/web/src/api/query_keys/search.ts index 88b3bf92a..3d1ca5c60 100644 --- a/web/src/api/query_keys/search.ts +++ b/web/src/api/query_keys/search.ts @@ -5,7 +5,7 @@ import { search } from '../buster_rest/search'; export const getSearchResult = (params: Parameters[0]) => queryOptions({ queryKey: ['search', 'results', params] as const, - staleTime: 1000 * 30 // 30 seconds, + staleTime: 1000 * 45 // 45 seconds, }); export const searchQueryKeys = { diff --git a/web/src/components/features/modal/AddToCollectionModal.tsx b/web/src/components/features/modal/AddToCollectionModal.tsx index 45be7c758..1034d53c2 100644 --- a/web/src/components/features/modal/AddToCollectionModal.tsx +++ b/web/src/components/features/modal/AddToCollectionModal.tsx @@ -20,7 +20,7 @@ export const AddToCollectionModal: React.FC<{ const { mutateAsync: addAndRemoveAssetsFromCollection } = useAddAndRemoveAssetsFromCollection(); const [searchTerm, setSearchTerm] = useState(''); - const debouncedSearchTerm = useDebounce(searchTerm, { wait: 150 }); + const debouncedSearchTerm = useDebounce(searchTerm, { wait: 100 }); const { data: searchResults } = useSearch({ query: debouncedSearchTerm, asset_types: ['metric', 'dashboard'], diff --git a/web/src/components/features/modal/AddToDashboardModal.tsx b/web/src/components/features/modal/AddToDashboardModal.tsx index e10b1820e..354862253 100644 --- a/web/src/components/features/modal/AddToDashboardModal.tsx +++ b/web/src/components/features/modal/AddToDashboardModal.tsx @@ -16,7 +16,7 @@ export const AddToDashboardModal: React.FC<{ const [searchTerm, setSearchTerm] = useState(''); const [selectedMetrics, setSelectedMetrics] = useState([]); - const debouncedSearchTerm = useDebounce(searchTerm, { wait: 150 }); + const debouncedSearchTerm = useDebounce(searchTerm, { wait: 100 }); const { data: searchResults } = useSearch( {