fix(devtools): call change tab helper when tab changes as a result of the inspector being selected

This commit is contained in:
AleksanderBodurri 2021-03-12 21:18:56 -05:00 committed by Minko Gechev
parent 2e5ff2f4d8
commit cb4e86c016
2 changed files with 3 additions and 3 deletions

View file

@ -16,7 +16,7 @@
</mat-icon>
</button>
</div>
<a class="mat-tab-link" mat-tab-link *ngFor="let tab of tabs" (click)="onTabChange(tab)" [active]="activeTab === tab">
<a class="mat-tab-link" mat-tab-link *ngFor="let tab of tabs" (click)="changeTab(tab)" [active]="activeTab === tab">
{{ tab }}
</a>
<section *ngIf="angularVersion" id="app-angular-version">

View file

@ -61,7 +61,7 @@ export class DevToolsTabsComponent implements OnInit, OnDestroy, AfterViewInit {
return this._applicationEnvironment.environment.process.env.LATEST_SHA;
}
onTabChange(tab: 'Profiler' | 'Components' | 'Router Tree'): void {
changeTab(tab: 'Profiler' | 'Components' | 'Router Tree'): void {
this.activeTab = tab;
this.tabUpdate.notify();
if (tab === 'Router Tree') {
@ -77,7 +77,7 @@ export class DevToolsTabsComponent implements OnInit, OnDestroy, AfterViewInit {
emitInspectorEvent(): void {
if (this.inspectorRunning) {
this._messageBus.emit('inspectorStart');
this.activeTab = 'Components';
this.changeTab('Components');
} else {
this._messageBus.emit('inspectorEnd');
this._messageBus.emit('removeHighlightOverlay');