diff --git a/src/components/databrowser/hooks/use-keys.tsx b/src/components/databrowser/hooks/use-keys.tsx index 63e82a1..f885ce9 100644 --- a/src/components/databrowser/hooks/use-keys.tsx +++ b/src/components/databrowser/hooks/use-keys.tsx @@ -27,7 +27,7 @@ export const KeysProvider = ({ children }: PropsWithChildren) => { const { search } = useDatabrowserStore() const cleanSearchKey = search.key.replace("*", "") - const { data: exactMatchType } = useFetchKeyType(cleanSearchKey) + const { data: exactMatchType, isFetching } = useFetchKeyType(cleanSearchKey) const { fetchKeys, resetCache } = useFetchKeys(search) const pageRef = useRef(0) @@ -47,6 +47,7 @@ export const KeysProvider = ({ children }: PropsWithChildren) => { getNextPageParam: (lastPage, __, lastPageIndex) => { return lastPage.hasNextPage ? lastPageIndex + 1 : undefined }, + enabled: !isFetching, refetchOnMount: false, })