Browse Source

refactor(gui): show error message on failure

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4046/head
Pranav C 2 years ago
parent
commit
7d3aab549b
  1. 4
      packages/nc-gui/composables/useSmartsheetRowStore.ts

4
packages/nc-gui/composables/useSmartsheetRowStore.ts

@ -122,6 +122,7 @@ const [useProvideSmartsheetRowStore, useSmartsheetRowStore] = useInjectionState(
// clear LTAR cell
const clearLTARCell = async (column: ColumnType) => {
try {
if (!column || column.uidt !== UITypes.LinkToAnotherRecord) return
const relatedTableMeta = metas.value?.[(<LinkToAnotherRecordType>column?.colOptions)?.fk_related_model_id as string]
@ -152,9 +153,12 @@ const [useProvideSmartsheetRowStore, useSmartsheetRowStore] = useInjectionState(
column.title as string,
extractPkFromRow(link, relatedTableMeta?.columns as ColumnType[]),
)
}
currentRow.value.row[column.title!] = []
}
}
} catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e))
}
}

Loading…
Cancel
Save