From 2445b181f9e53687b96766408ec7e32c4ef762db Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 12 Apr 2022 22:39:25 +0530 Subject: [PATCH] fix: stay in same view even after view active name update re #1653 Signed-off-by: Pranav C --- .../components/spreadsheetNavDrawer.vue | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue b/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue index 5ea813c32b..a83074361c 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue @@ -767,22 +767,15 @@ export default { return } try { - if (this.selectedViewIdLocal === view.id) { - await this.$router.push({ - query: { - ...this.$route.query, - view: view.title_temp - } - }) - } + // if (this.selectedViewIdLocal === view.id) { + // await this.$router.push({ + // query: { + // ...this.$route.query, + // view: view.title_temp + // } + // }) + // } this.$set(view, 'title', view.title_temp) - // await this.sqlOp({ dbAlias: this.nodes.dbAlias }, 'xcVirtualTableRename', { - // id: view.id, - // old_title: oldTitle, - // title: view.title_temp, - // alias: view.alias, - // parent_model_title: this.meta.table_name - // }) await this.$api.dbView.update(view.id, { title: view.title, order: view.order @@ -804,12 +797,6 @@ export default { }, async deleteView(view) { try { - // await this.sqlOp({ dbAlias: this.nodes.dbAlias }, 'xcVirtualTableDelete', { - // id: view.id, - // title: view.alias || view.title, - // view_name: view.alias || view.title, - // parent_model_title: this.table - // }) await this.$api.dbView.delete(view.id) this.$toast.success('View deleted successfully').goAway(3000) await this.loadViews()