From 0761afc4e1a2fc017a6e8783de090ba4235bd5b3 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 9 Nov 2023 15:36:53 +0530 Subject: [PATCH] fix: remove commented code --- packages/nc-gui/components/smartsheet/Row.vue | 10 ---------- .../components/smartsheet/expanded-form/index.vue | 7 ++----- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Row.vue b/packages/nc-gui/components/smartsheet/Row.vue index 5a305bdc02..57e31f4bd4 100644 --- a/packages/nc-gui/components/smartsheet/Row.vue +++ b/packages/nc-gui/components/smartsheet/Row.vue @@ -24,16 +24,6 @@ const { meta } = useSmartsheetStoreOrThrow() const { isNew, state, syncLTARRefs, clearLTARCell, addLTARRef } = useProvideSmartsheetRowStore(meta as Ref, currentRow) -// on changing isNew(new record insert) status sync LTAR cell values -watch(isNew, async (nextVal, prevVal) => { - // if (prevVal && !nextVal) { - // await syncLTARRefs(currentRow.value.row) - // // update row values without invoking api - // currentRow.value.row = { ...currentRow.value.row, ...state.value } - // currentRow.value.oldRow = { ...currentRow.value.row, ...state.value } - // } -}) - const reloadViewDataTrigger = inject(ReloadViewDataHookInj)! // override reload trigger and use it to reload row diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue index 0cc191d6a3..772bf2932d 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue @@ -185,7 +185,6 @@ const onDuplicateRow = () => { const save = async () => { if (isNew.value) { const data = await _save(rowState.value) - // await syncLTARRefs(data) reloadTrigger?.trigger() } else { let kanbanClbk @@ -340,8 +339,7 @@ useActiveKeyupListener( e.stopPropagation() if (isNew.value) { - const data = await _save(rowState.value) - // await syncLTARRefs(data) + await _save(rowState.value) reloadHook?.trigger(null) } else { await save() @@ -375,8 +373,7 @@ useActiveKeyupListener( okText: t('general.save'), cancelText: t('labels.discard'), onOk: async () => { - const data = await _save(rowState.value) - // await syncLTARRefs(data) + await _save(rowState.value) reloadHook?.trigger(null) addNewRow() },