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) 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)! const reloadViewDataTrigger = inject(ReloadViewDataHookInj)!
// override reload trigger and use it to reload row // 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 () => { const save = async () => {
if (isNew.value) { if (isNew.value) {
const data = await _save(rowState.value) const data = await _save(rowState.value)
// await syncLTARRefs(data)
reloadTrigger?.trigger() reloadTrigger?.trigger()
} else { } else {
let kanbanClbk let kanbanClbk
@ -340,8 +339,7 @@ useActiveKeyupListener(
e.stopPropagation() e.stopPropagation()
if (isNew.value) { if (isNew.value) {
const data = await _save(rowState.value) await _save(rowState.value)
// await syncLTARRefs(data)
reloadHook?.trigger(null) reloadHook?.trigger(null)
} else { } else {
await save() await save()
@ -375,8 +373,7 @@ useActiveKeyupListener(
okText: t('general.save'), okText: t('general.save'),
cancelText: t('labels.discard'), cancelText: t('labels.discard'),
onOk: async () => { onOk: async () => {
const data = await _save(rowState.value) await _save(rowState.value)
// await syncLTARRefs(data)
reloadHook?.trigger(null) reloadHook?.trigger(null)
addNewRow() addNewRow()
}, },

Loading…
Cancel
Save