From 8e6359b3a439b48b0397bf6d1b8e3cb135244c95 Mon Sep 17 00:00:00 2001 From: Abbie Petchtes Date: Wed, 7 Mar 2018 10:20:41 -0800 Subject: [PATCH] fix nav section layout (#854) --- src/sql/base/browser/ui/panel/panel.component.ts | 7 +++++++ .../dashboard/containers/dashboardNavSection.component.ts | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sql/base/browser/ui/panel/panel.component.ts b/src/sql/base/browser/ui/panel/panel.component.ts index 52ba175477..27562588a3 100644 --- a/src/sql/base/browser/ui/panel/panel.component.ts +++ b/src/sql/base/browser/ui/panel/panel.component.ts @@ -217,6 +217,13 @@ export class PanelComponent extends Disposable implements AfterContentInit, OnIn } } + /** + * Get the id of the active tab + */ + public get getActiveTab(): string { + return this._activeTab.identifier; + } + private findAndRemoveTabFromMRU(tab: TabComponent): void { let mruIndex = this._mru.findIndex(i => i === tab); diff --git a/src/sql/parts/dashboard/containers/dashboardNavSection.component.ts b/src/sql/parts/dashboard/containers/dashboardNavSection.component.ts index d3423ffadd..8c0c7e26a2 100644 --- a/src/sql/parts/dashboard/containers/dashboardNavSection.component.ts +++ b/src/sql/parts/dashboard/containers/dashboardNavSection.component.ts @@ -142,7 +142,10 @@ export class DashboardNavSection extends DashboardTab implements OnDestroy, OnCh } public layout() { - + let activeTabId = this._panel.getActiveTab; + let localtab = this._tabs.find(i => i.id === activeTabId); + this._cd.detectChanges(); + localtab.layout(); } public refresh(): void {