We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a056625 commit 2c30ebcCopy full SHA for 2c30ebc
packages/react-devtools-shared/src/backend/agent.js
@@ -1086,6 +1086,15 @@ export default class Agent extends EventEmitter<{
1086
}
1087
renderer.updateComponentFilters(componentFilters);
1088
1089
+
1090
+ // Due to the component filters changing, we might be able
1091
+ // to select a closer match for the currently selected host element.
1092
+ // The store will already select a suitable parent if the the current
1093
+ // selection is now filtered out in which cases this will be a no-op.
1094
+ const target = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0;
1095
+ if (target != null) {
1096
+ this.selectNode(target);
1097
+ }
1098
};
1099
1100
getEnvironmentNames: () => void = () => {
0 commit comments