Return lastNonHostInstance in getInspectorDataForInstance for devtools (#25441)
This commit is contained in:
parent
5d60a0b840
commit
513417d695
|
@ -112,6 +112,7 @@ if (__DEV__ || enableGetInspectorDataForInstanceInProduction) {
|
||||||
const selectedIndex = fiberHierarchy.indexOf(instance);
|
const selectedIndex = fiberHierarchy.indexOf(instance);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
closestInstance: instance,
|
||||||
hierarchy,
|
hierarchy,
|
||||||
props,
|
props,
|
||||||
selectedIndex,
|
selectedIndex,
|
||||||
|
@ -225,7 +226,6 @@ if (__DEV__) {
|
||||||
pointerY: locationY,
|
pointerY: locationY,
|
||||||
frame: {left: pageX, top: pageY, width, height},
|
frame: {left: pageX, top: pageY, width, height},
|
||||||
touchedViewTag: nativeViewTag,
|
touchedViewTag: nativeViewTag,
|
||||||
closestInstance,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -138,6 +138,7 @@ type InspectorDataGetter = (
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
export type InspectorData = $ReadOnly<{
|
export type InspectorData = $ReadOnly<{
|
||||||
|
closestInstance?: mixed,
|
||||||
hierarchy: Array<{
|
hierarchy: Array<{
|
||||||
name: ?string,
|
name: ?string,
|
||||||
getInspectorData: InspectorDataGetter,
|
getInspectorData: InspectorDataGetter,
|
||||||
|
@ -150,7 +151,6 @@ export type InspectorData = $ReadOnly<{
|
||||||
export type TouchedViewDataAtPoint = $ReadOnly<{
|
export type TouchedViewDataAtPoint = $ReadOnly<{
|
||||||
pointerY: number,
|
pointerY: number,
|
||||||
touchedViewTag?: number,
|
touchedViewTag?: number,
|
||||||
closestInstance?: mixed,
|
|
||||||
frame: $ReadOnly<{
|
frame: $ReadOnly<{
|
||||||
top: number,
|
top: number,
|
||||||
left: number,
|
left: number,
|
||||||
|
|
Loading…
Reference in New Issue