From 8f01740475ea6d5d9b5eefabdbf27099df76f2cf Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Wed, 22 Jun 2022 18:47:32 +0200 Subject: [PATCH] fix(UI): wrong tables scrollable height after switching tabs --- src/common/interfaces/antares.ts | 2 +- src/renderer/components/WorkspaceTabQueryTable.vue | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/interfaces/antares.ts b/src/common/interfaces/antares.ts index 6a504d7a..753bd81b 100644 --- a/src/common/interfaces/antares.ts +++ b/src/common/interfaces/antares.ts @@ -125,7 +125,7 @@ export interface TableField { alias: string; tableAlias: string; orgTable: string; - key?: 'pri' | 'uni'; + key?: 'pri' | 'uni' | ''; } export interface TableIndex { diff --git a/src/renderer/components/WorkspaceTabQueryTable.vue b/src/renderer/components/WorkspaceTabQueryTable.vue index a47408c4..ce72c893 100644 --- a/src/renderer/components/WorkspaceTabQueryTable.vue +++ b/src/renderer/components/WorkspaceTabQueryTable.vue @@ -634,8 +634,11 @@ watch(resultsetIndex, () => { setLocalResults(); }); -watch(() => props.isSelected, (val) => { - if (val) refreshScroller(); +watch(() => props.isSelected, async (val) => { + if (val) { + await nextTick(); + refreshScroller(); + } }); onUpdated(() => {