Browse Source

fix(gui): ignore update if property is not there in row data

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4302/head
Pranav C 2 years ago
parent
commit
584bcc03f0
  1. 2
      packages/nc-gui/components/smartsheet/Grid.vue

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -383,7 +383,7 @@ const saveOrUpdateRecords = async (args: { metaValue?: TableType; viewMetaValue?
currentRow.rowMeta.changed = false currentRow.rowMeta.changed = false
for (const field of (args.metaValue || meta.value)?.columns ?? []) { for (const field of (args.metaValue || meta.value)?.columns ?? []) {
if (isVirtualCol(field)) continue if (isVirtualCol(field)) continue
if (currentRow.row[field.title!] !== currentRow.oldRow[field.title!]) { if (field.title! in currentRow.row && currentRow.row[field.title!] !== currentRow.oldRow[field.title!]) {
await updateOrSaveRow(currentRow, field.title!, {}, args) await updateOrSaveRow(currentRow, field.title!, {}, args)
} }
} }

Loading…
Cancel
Save