From dbab06fcb80ccdae85215ceae9ba24af3e7ff263 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Mon, 22 Feb 2021 11:10:04 +0100 Subject: [PATCH] fix(UI): data tab opened when non-table element is selected --- src/renderer/components/Workspace.vue | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/renderer/components/Workspace.vue b/src/renderer/components/Workspace.vue index 58db10c7..6556310d 100644 --- a/src/renderer/components/Workspace.vue +++ b/src/renderer/components/Workspace.vue @@ -164,13 +164,20 @@ export default { }, selectedTab () { if ( - this.workspace.breadcrumbs.table === null && - this.workspace.breadcrumbs.view === null && - this.workspace.breadcrumbs.trigger === null && - this.workspace.breadcrumbs.procedure === null && - this.workspace.breadcrumbs.function === null && - this.workspace.breadcrumbs.scheduler === null && - ['data', 'prop'].includes(this.workspace.selected_tab) + ( + this.workspace.breadcrumbs.table === null && + this.workspace.breadcrumbs.view === null && + this.workspace.breadcrumbs.trigger === null && + this.workspace.breadcrumbs.procedure === null && + this.workspace.breadcrumbs.function === null && + this.workspace.breadcrumbs.scheduler === null && + ['data', 'prop'].includes(this.workspace.selected_tab) + ) || + ( + this.workspace.breadcrumbs.table === null && + this.workspace.breadcrumbs.view === null && + this.workspace.selected_tab === 'data' + ) ) return this.queryTabs[0].uid;