mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Stop spamming highlight events when a component is selected (#25448)
This commit is contained in:
-15
@@ -131,21 +131,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
|
||||
}
|
||||
},
|
||||
});
|
||||
bridge.addListener(
|
||||
'inspectElement',
|
||||
({id, rendererID}: {id: number, rendererID: number, ...}) => {
|
||||
const renderer = agent.rendererInterfaces[rendererID];
|
||||
if (renderer != null) {
|
||||
// Send event for RN to highlight.
|
||||
const nodes: ?Array<HTMLElement> = renderer.findNativeNodesForFiberID(
|
||||
id,
|
||||
);
|
||||
if (nodes != null && nodes[0] != null) {
|
||||
agent.emit('showNativeHighlight', nodes[0]);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
||||
bridge.addListener(
|
||||
'updateComponentFilters',
|
||||
|
||||
Reference in New Issue
Block a user