From 3961c1abf0ab4d35ff0e6bb81cffd1ed336affb1 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Tue, 25 Jun 2024 11:53:23 +0200 Subject: [PATCH] feat: now command bar will not search behind the scene (#7443) Previously it was doing request to search behind to scenes, when noone was using the nav bar. This fixes it. --- frontend/src/component/commandBar/CommandBar.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/commandBar/CommandBar.tsx b/frontend/src/component/commandBar/CommandBar.tsx index 565ba5e304..1f6b6a53cb 100644 --- a/frontend/src/component/commandBar/CommandBar.tsx +++ b/frontend/src/component/commandBar/CommandBar.tsx @@ -115,10 +115,15 @@ export const CommandBar = () => { const [value, setValue] = useState(''); - const { features = [] } = useFeatureSearch({ - query: searchString, - limit: '3', - }); + const { features = [] } = useFeatureSearch( + { + query: searchString, + limit: '3', + }, + { + revalidateOnFocus: false, + }, + ); const { projects } = useProjects(); const debouncedSetSearchState = useAsyncDebounce((query) => {