Browse Source

fix: print info message when the deleted row has LTAR data

pull/2608/head
Wing-Kam Wong 2 years ago
parent
commit
da5a233cda
  1. 21
      packages/nc-gui/components/project/spreadsheet/RowsXcDataTable.vue

21
packages/nc-gui/components/project/spreadsheet/RowsXcDataTable.vue

@ -1127,7 +1127,26 @@ export default {
if (!id) {
return this.$toast.info("Delete not allowed for table which doesn't have primary Key").goAway(3000);
}
await this.$api.dbViewRow.delete('noco', this.projectName, this.meta.id, this.selectedView.id, id);
const res = await this.$api.dbViewRow.delete(
'noco',
this.projectName,
this.meta.id,
this.selectedView.id,
id
);
if (res?.message) {
this.$toast
.info(
`<div style="padding:10px 4px">Unable to delete tables because of the following.
<br><br>${res.message.join('<br>')}<br><br>
Clear the data first & try again</div>
`
)
.goAway(5000);
return;
}
}
this.data.splice(this.rowContextMenu.index, 1);
this.syncCount();

Loading…
Cancel
Save