diff --git a/packages/nc-gui-v2/components/smartsheet/Grid.vue b/packages/nc-gui-v2/components/smartsheet/Grid.vue index 2cd1c6af5d..44f7fb4db0 100644 --- a/packages/nc-gui-v2/components/smartsheet/Grid.vue +++ b/packages/nc-gui-v2/components/smartsheet/Grid.vue @@ -349,7 +349,7 @@ const expandForm = (row: Row, state: Record) => { {{ row.rowMeta.commentCount }} import type { Row } from '~/composables' -import { useSmartsheetStoreOrThrow } from '~/composables' -import { useProvideSmartsheetRowStore } from '~/composables/useSmartsheetRowStore' +import { useProvideSmartsheetRowStore, useSmartsheetStoreOrThrow } from '#imports' interface Props { row: Row } const props = defineProps() -const row = toRef(props, 'row') +const currentRow = toRef(props, 'row') const { meta } = useSmartsheetStoreOrThrow() -const { isNew, state, syncLTARRefs } = useProvideSmartsheetRowStore(meta, row) +const { isNew, state, syncLTARRefs } = useProvideSmartsheetRowStore(meta, currentRow) // on changing isNew(new record insert) status sync LTAR cell values watch(isNew, async (nextVal, prevVal) => { if (prevVal && !nextVal) { - await syncLTARRefs(row.value.row) + await syncLTARRefs(currentRow.value.row) // update row values without invoking api - row.value.row = { ...row.value.row, ...state.value } - row.value.oldRow = { ...row.value.row, ...state.value } + currentRow.value.row = { ...currentRow.value.row, ...state.value } + currentRow.value.oldRow = { ...currentRow.value.row, ...state.value } } }) diff --git a/packages/nc-gui-v2/components/smartsheet/expanded-form/Header.vue b/packages/nc-gui-v2/components/smartsheet/expanded-form/Header.vue index 8af72be3bf..8a9f6dc12c 100644 --- a/packages/nc-gui-v2/components/smartsheet/expanded-form/Header.vue +++ b/packages/nc-gui-v2/components/smartsheet/expanded-form/Header.vue @@ -1,7 +1,11 @@