From cf82f4f957ecc36e1edfc19580045df42cccaccb Mon Sep 17 00:00:00 2001 From: valentinkolb Date: Wed, 15 May 2024 00:02:59 +0200 Subject: [PATCH] fix(EventListView): added requestKey to disable autocancalation of listSlotsQuery --- src/pages/events/s/EventListView.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/events/s/EventListView.tsx b/src/pages/events/s/EventListView.tsx index b0ed99a..4873f18 100644 --- a/src/pages/events/s/EventListView.tsx +++ b/src/pages/events/s/EventListView.tsx @@ -15,7 +15,9 @@ export default function EventListView({event, listId}: { event: EventModel, list const listQuery = useQuery({ queryKey: ["event", "list", listId], - queryFn: async () => (await pb.collection("eventLists").getOne(listId)), + queryFn: async () => (await pb.collection("eventLists").getOne(listId, { + requestKey: listId + })), enabled: !!listId }) @@ -24,7 +26,8 @@ export default function EventListView({event, listId}: { event: EventModel, list queryFn: async () => (await pb.collection("eventListSlotsWithEntriesCount").getList(activePage, 10, { filter: `eventList='${listId}'`, sort: "startDate", - enabled: !!listId + enabled: !!listId, + requestKey: listId })) })