mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
[DevTools] Update inspected element on component filter changes (#35599)
This commit is contained in:
1 parent
a0566250b2
commit
2c30ebc4e3
1 file changed
+9
@@ -1086,6 +1086,15 @@ export default class Agent extends EventEmitter<{
|
||||
}
|
||||
renderer.updateComponentFilters(componentFilters);
|
||||
}
|
||||
|
||||
// Due to the component filters changing, we might be able
|
||||
// to select a closer match for the currently selected host element.
|
||||
// The store will already select a suitable parent if the the current
|
||||
// selection is now filtered out in which cases this will be a no-op.
|
||||
const target = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0;
|
||||
if (target != null) {
|
||||
this.selectNode(target);
|
||||
}
|
||||
};
|
||||
|
||||
getEnvironmentNames: () => void = () => {
|
||||
|
||||
Reference in new issue
Block a user