From 4f33dcca5d9e7852177c46bf27efaf054473d136 Mon Sep 17 00:00:00 2001 From: hawkgs Date: Wed, 2 Apr 2025 13:33:28 +0300 Subject: [PATCH] refactor(devtools): switch to components tab whenever the inspector is used Switch to the components tab, if not there, when a component is selected via the inspector. --- .../src/lib/devtools-tabs/devtools-tabs.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.ts index 4c9b50fc44f4..7794dfe1175e 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/devtools-tabs.component.ts @@ -95,6 +95,13 @@ export class DevToolsTabsComponent { this.routes.set(routes || []); }); + // Change the tab to Components, if an element is selected via the inspector. + this._messageBus.on('selectComponent', () => { + if (this.activeTab() !== 'Components') { + this.changeTab('Components'); + } + }); + if (typeof chrome !== 'undefined' && chrome.runtime !== undefined) { this.extensionVersion.set(chrome.runtime.getManifest().version); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy