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);
|
||||
|
||||
return {
|
||||
closestInstance: instance,
|
||||
hierarchy,
|
||||
props,
|
||||
selectedIndex,
|
||||
|
@ -225,7 +226,6 @@ if (__DEV__) {
|
|||
pointerY: locationY,
|
||||
frame: {left: pageX, top: pageY, width, height},
|
||||
touchedViewTag: nativeViewTag,
|
||||
closestInstance,
|
||||
});
|
||||
},
|
||||
);
|
||||
|
|
|
@ -138,6 +138,7 @@ type InspectorDataGetter = (
|
|||
}>;
|
||||
|
||||
export type InspectorData = $ReadOnly<{
|
||||
closestInstance?: mixed,
|
||||
hierarchy: Array<{
|
||||
name: ?string,
|
||||
getInspectorData: InspectorDataGetter,
|
||||
|
@ -150,7 +151,6 @@ export type InspectorData = $ReadOnly<{
|
|||
export type TouchedViewDataAtPoint = $ReadOnly<{
|
||||
pointerY: number,
|
||||
touchedViewTag?: number,
|
||||
closestInstance?: mixed,
|
||||
frame: $ReadOnly<{
|
||||
top: number,
|
||||
left: number,
|
||||
|
|
Loading…
Reference in New Issue