Browse Source

fix(nc-gui): bypass attachment in saveOrUpdateRecords

pull/4987/head
Wing-Kam Wong 2 years ago
parent
commit
d28fa071ed
  1. 5
      packages/nc-gui/components/smartsheet/Grid.vue

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

@ -558,11 +558,14 @@ const saveOrUpdateRecords = async (args: { metaValue?: TableType; viewMetaValue?
currentRow.rowMeta.changed = false
continue
}
/** if existing row check updated cell and invoke update method */
if (currentRow.rowMeta.changed) {
currentRow.rowMeta.changed = false
for (const field of (args.metaValue || meta.value)?.columns ?? []) {
if (isVirtualCol(field)) continue
// `url` would be enriched in attachment during listing
// hence it would consider as a change while it is not necessary to update
if (isVirtualCol(field) || field.uidt === UITypes.Attachment) continue
if (field.title! in currentRow.row && currentRow.row[field.title!] !== currentRow.oldRow[field.title!]) {
await updateOrSaveRow(currentRow, field.title!, {}, args)
}

Loading…
Cancel
Save