Browse Source

fix: remove commented code

pull/6817/head
Pranav C 1 year ago
parent
commit
0761afc4e1
  1. 10
      packages/nc-gui/components/smartsheet/Row.vue
  2. 7
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

10
packages/nc-gui/components/smartsheet/Row.vue

@ -24,16 +24,6 @@ const { meta } = useSmartsheetStoreOrThrow()
const { isNew, state, syncLTARRefs, clearLTARCell, addLTARRef } = useProvideSmartsheetRowStore(meta as Ref<TableType>, 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

7
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()
},

Loading…
Cancel
Save