mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(devtools): call change tab helper when tab changes as a result of the inspector being selected
This commit is contained in:
parent
2e5ff2f4d8
commit
cb4e86c016
2 changed files with 3 additions and 3 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue