diff --git a/apps/client/src/ee/template/queries/template-query.ts b/apps/client/src/ee/template/queries/template-query.ts index 237ca94d8..81bf73874 100644 --- a/apps/client/src/ee/template/queries/template-query.ts +++ b/apps/client/src/ee/template/queries/template-query.ts @@ -5,6 +5,7 @@ import { useQueryClient, UseQueryResult, InfiniteData, + keepPreviousData, } from "@tanstack/react-query"; import { useAtom, useStore } from "jotai"; import { @@ -35,6 +36,7 @@ export function useGetTemplatesQuery(params?: { spaceId?: string }) { initialPageParam: undefined as string | undefined, getNextPageParam: (lastPage) => lastPage.meta.hasNextPage ? lastPage.meta.nextCursor : undefined, + placeholderData: keepPreviousData, }); }