From 69c5cf1a4c5edf5798907bdc0fa30c58066e9c57 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 29 Oct 2024 19:39:00 +0000 Subject: [PATCH] fix: data in sidebar not getting updated --- packages/nc-gui/composables/useCalendarViewStore.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/nc-gui/composables/useCalendarViewStore.ts b/packages/nc-gui/composables/useCalendarViewStore.ts index cd315c7df3..246d1a6d4f 100644 --- a/packages/nc-gui/composables/useCalendarViewStore.ts +++ b/packages/nc-gui/composables/useCalendarViewStore.ts @@ -787,6 +787,16 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState( Object.assign(toUpdate.oldRow, updatedRowData) } + const upPk = extractPkFromRow(updatedRowData, meta?.value?.columns as ColumnType[]) + + formattedSideBarData.value = formattedSideBarData.value.map((row) => { + if (extractPkFromRow(row.row, meta?.value?.columns as ColumnType[]) === upPk) { + Object.assign(row.row, updatedRowData) + Object.assign(row.oldRow, updatedRowData) + } + return row + }) + await fetchActiveDates() return updatedRowData } catch (e: any) {