Browse Source

fix: update shared link table on view rename

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/679/head
Pranav C 3 years ago
parent
commit
13dde51862
  1. 7
      packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue

7
packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue

@ -697,6 +697,9 @@ export default {
if (!view.edit) {
return
}
const old_title = view.title
this.$set(view, 'edit', false)
if (view.title_temp === view.title) { return }
if (this.viewsList.some((v, i) => i !== index && (v.alias || v.title) === view.title_temp)) {
@ -715,10 +718,10 @@ export default {
this.$set(view, 'title', view.title_temp)
await this.sqlOp({ dbAlias: this.nodes.dbAlias }, 'xcVirtualTableRename', {
id: view.id,
old_title: view.title,
old_title,
title: view.title_temp,
alias: view.alias,
parent_model_title: this.meta._tn
parent_model_title: this.meta.tn
})
this.$toast.success('View renamed successfully').goAway(3000)
} catch (e) {

Loading…
Cancel
Save