refactor(devtools): switch to components tab whenever the inspector is used (#60694)

Switch to the components tab, if not there, when a component is selected via the inspector.

PR Close #60694
This commit is contained in:
hawkgs 2025-04-02 13:33:28 +03:00 committed by kirjs
parent 7c1a16db26
commit c5ca597aeb

View file

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