Stop inspecting when an element is selected
Summary: Changelog: [General][Fixed] In RN devtools, call that method, and then set component state to not inspecting. Reviewed By: lunaruan Differential Revision: D38852009 fbshipit-source-id: d14bd4cc4461f0f7ec4ae9cd6098a58eef3e6ab9
This commit is contained in:
Родитель
6163029d4a
Коммит
bfb36c2163
|
@ -122,12 +122,15 @@ export default function DevtoolsOverlay({
|
|||
locationY,
|
||||
viewData => {
|
||||
const {touchedViewTag, closestInstance} = viewData;
|
||||
if (closestInstance != null) {
|
||||
// Fabric
|
||||
agent.selectNode(closestInstance);
|
||||
return true;
|
||||
} else if (touchedViewTag != null) {
|
||||
agent.selectNode(findNodeHandle(touchedViewTag));
|
||||
if (closestInstance != null || touchedViewTag != null) {
|
||||
if (closestInstance != null) {
|
||||
// Fabric
|
||||
agent.selectNode(closestInstance);
|
||||
} else {
|
||||
agent.selectNode(findNodeHandle(touchedViewTag));
|
||||
}
|
||||
agent.stopInspectingNative(true);
|
||||
setIsInspecting(false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче