mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 22:44:52 +00:00
[fix] add 'timeStamp' to scroll and layout events
This commit is contained in:
@@ -37,7 +37,8 @@ const normalizeScrollEvent = (e) => ({
|
||||
return e.target.offsetWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
timeStamp: Date.now()
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ const applyLayout = (Component) => {
|
||||
if (layout.x !== x || layout.y !== y || layout.width !== width || layout.height !== height) {
|
||||
const nextLayout = { x, y, width, height };
|
||||
const nativeEvent = { layout: nextLayout };
|
||||
onLayout({ nativeEvent });
|
||||
onLayout({ nativeEvent, timeStamp: Date.now() });
|
||||
this._layoutState = nextLayout;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user