aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared-react
diff options
context:
space:
mode:
Diffstat (limited to 'packages/shared-react')
-rw-r--r--packages/shared-react/hooks/tags.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/shared-react/hooks/tags.ts b/packages/shared-react/hooks/tags.ts
index 617c6933..e1e7416f 100644
--- a/packages/shared-react/hooks/tags.ts
+++ b/packages/shared-react/hooks/tags.ts
@@ -20,6 +20,7 @@ export function usePaginatedSearchTags(
export function useTagAutocomplete<T>(opts: {
nameContains: string;
select?: (tags: ZTagListResponse) => T;
+ enabled?: boolean;
}) {
return api.tags.list.useQuery(
{
@@ -31,6 +32,7 @@ export function useTagAutocomplete<T>(opts: {
select: opts.select,
placeholderData: keepPreviousData,
gcTime: opts.nameContains?.length > 0 ? 60_000 : 3_600_000,
+ enabled: opts.enabled,
},
);
}