From d59fc8ea0f22160674857f6d05140b59e70557b9 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 20 Feb 2024 07:15:55 +0000 Subject: [PATCH] fix(nc-gui): prevent reload on selected view change for week view and month view --- packages/nc-gui/composables/useCalendarViewStore.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/composables/useCalendarViewStore.ts b/packages/nc-gui/composables/useCalendarViewStore.ts index c659c01a2e..04336e5dee 100644 --- a/packages/nc-gui/composables/useCalendarViewStore.ts +++ b/packages/nc-gui/composables/useCalendarViewStore.ts @@ -456,7 +456,11 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState( } watch(selectedDate, async () => { - await Promise.all([loadCalendarData(), loadSidebarData()]) + if (activeCalendarView.value === 'month' || activeCalendarView.value === 'week') { + await loadSidebarData() + } else { + await Promise.all([loadCalendarData(), loadSidebarData()]) + } }) watch(selectedDateRange, async () => {