fix nav section layout (#854)

This commit is contained in:
Abbie Petchtes
2018-03-07 10:20:41 -08:00
committed by GitHub
parent aac77ed982
commit 8e6359b3a4
2 changed files with 11 additions and 1 deletions

View File

@@ -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);

View File

@@ -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 {