From 190e62da150990b2a2672d2a0e65ab7fdd59049a Mon Sep 17 00:00:00 2001 From: mertmit Date: Wed, 1 May 2024 02:46:05 +0300 Subject: [PATCH] fix: provide ltar state to save row Signed-off-by: mertmit --- packages/nc-gui/components/smartsheet/grid/Table.vue | 3 +-- .../components/virtual-cell/components/UnLinkedItems.vue | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/grid/Table.vue b/packages/nc-gui/components/smartsheet/grid/Table.vue index fd18bcf344..0c5dbb5e88 100644 --- a/packages/nc-gui/components/smartsheet/grid/Table.vue +++ b/packages/nc-gui/components/smartsheet/grid/Table.vue @@ -1073,9 +1073,8 @@ const saveOrUpdateRecords = async ( /** if new record save row and save the LTAR cells */ if (currentRow.rowMeta.new) { const beforeSave = clone(currentRow) - const savedRow = await updateOrSaveRow?.(currentRow, '', {}, args) + const savedRow = await updateOrSaveRow?.(currentRow, '', currentRow.rowMeta.ltarState || {}, args) if (savedRow) { - await syncLTARRefs?.(currentRow, savedRow, args) currentRow.rowMeta.changed = false } else { if (args.keepNewRecords) { diff --git a/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue b/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue index 5f79a4462f..d99ad86bd4 100644 --- a/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue @@ -201,7 +201,6 @@ const addNewRecord = () => { const onCreatedRecord = (record: any) => { addLTARRef(record, injectedColumn?.value as ColumnType) - saveRow!() reloadTrigger?.trigger({ shouldShowLoading: false,