Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/react-devtools-shared/src/backend/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
Loading