From b733aa2ac9cbfda9786133177b51e880cf165b67 Mon Sep 17 00:00:00 2001 From: nichenqin Date: Thu, 21 Nov 2024 15:30:41 +0800 Subject: [PATCH] fix: fix calendar scope reactivity --- .../blocks/calendar-view/calendar-view-month-records.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte b/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte index f48372419..dc9c4bae7 100644 --- a/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte +++ b/apps/frontend/src/lib/components/blocks/calendar-view/calendar-view-month-records.svelte @@ -56,8 +56,8 @@ const getRecords = createInfiniteQuery( derived( - [t, viewId, calendarStore, startTimestamp, endTimestamp, search, validValue], - ([$table, $viewId, $calendarStore, $startTimestamp, $endTimestamp, $search, $filter]) => { + [t, viewId, calendarStore, startTimestamp, endTimestamp, search, validValue, scope], + ([$table, $viewId, $calendarStore, $startTimestamp, $endTimestamp, $search, $filter, $scope]) => { const date = $calendarStore.selectedDate const filters = match($scope) @@ -107,7 +107,7 @@ .with("thisWeek", () => $startOfWeekTimestamp?.toISOString()) .otherwise(() => undefined) return { - queryKey: ["records", $table?.id.value, $viewId, scope, dateString, $search], + queryKey: ["records", $table?.id.value, $viewId, $scope, dateString, $search], queryFn: ({ pageParam = 1 }) => { if (shareId) { return trpc.shareData.records.query({