Browse Source

fix: confirm data exist in updateRow response and modify

pull/7304/head
Pranav C 9 months ago
parent
commit
3f0811b9a0
  1. 21
      packages/nc-gui/composables/useData.ts

21
packages/nc-gui/composables/useData.ts

@ -236,16 +236,17 @@ export function useData(args: {
toUpdate.row,
metaValue!.columns!.reduce<Record<string, any>>((acc: Record<string, any>, col: ColumnType) => {
if (
col.uidt === UITypes.Formula ||
col.uidt === UITypes.QrCode ||
col.uidt === UITypes.Barcode ||
col.uidt === UITypes.Rollup ||
col.uidt === UITypes.Checkbox ||
col.uidt === UITypes.User ||
col.uidt === UITypes.LastModifiedTime ||
col.uidt === UITypes.Lookup ||
col.au ||
(col.cdf && / on update /i.test(col.cdf))
col.title in updatedRowData &&
(col.uidt === UITypes.Formula ||
col.uidt === UITypes.QrCode ||
col.uidt === UITypes.Barcode ||
col.uidt === UITypes.Rollup ||
col.uidt === UITypes.Checkbox ||
col.uidt === UITypes.User ||
col.uidt === UITypes.LastModifiedTime ||
col.uidt === UITypes.Lookup ||
col.au ||
(col.cdf && / on update /i.test(col.cdf)))
)
acc[col.title!] = updatedRowData[col.title!]
return acc

Loading…
Cancel
Save