Skip to content

Commit 513417d

Browse files
authored
Return lastNonHostInstance in getInspectorDataForInstance for devtools (#25441)
1 parent 5d60a0b commit 513417d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-native-renderer/src/ReactNativeFiberInspector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ if (__DEV__ || enableGetInspectorDataForInstanceInProduction) {
112112
const selectedIndex = fiberHierarchy.indexOf(instance);
113113

114114
return {
115+
closestInstance: instance,
115116
hierarchy,
116117
props,
117118
selectedIndex,
@@ -225,7 +226,6 @@ if (__DEV__) {
225226
pointerY: locationY,
226227
frame: {left: pageX, top: pageY, width, height},
227228
touchedViewTag: nativeViewTag,
228-
closestInstance,
229229
});
230230
},
231231
);

packages/react-native-renderer/src/ReactNativeTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ type InspectorDataGetter = (
138138
}>;
139139

140140
export type InspectorData = $ReadOnly<{
141+
closestInstance?: mixed,
141142
hierarchy: Array<{
142143
name: ?string,
143144
getInspectorData: InspectorDataGetter,
@@ -150,7 +151,6 @@ export type InspectorData = $ReadOnly<{
150151
export type TouchedViewDataAtPoint = $ReadOnly<{
151152
pointerY: number,
152153
touchedViewTag?: number,
153-
closestInstance?: mixed,
154154
frame: $ReadOnly<{
155155
top: number,
156156
left: number,

0 commit comments

Comments
 (0)