mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
4f8a8ce316
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39031 `UIScrollView` `contentOffset` is flow-relative, so `x` is relative to the right edge of the screen. This coordinate space disagrees with layout events, `scrollTo` coordinates, and other platforms. This applies the same logic we use for inverting `scrollTo` coordinates to invert `contentOffset` in scroll events, in both Paper and Fabric. We then remove the iOS specific workaround we have in VirtualizedList. I did not test `contentInset` as part of this, whose structure has explicit edges like `left` and `right`. Changelog: [iOS][Fixed] - Fix inverted `contentOffset` in scroll events in RTL Reviewed By: rozele Differential Revision: D48379915 fbshipit-source-id: 8a9cbb01608e79ef3b179a76fbe3997a0cd23845
@react-native/virtualized-lists
Installation
yarn add @react-native/virtualized-lists
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the React Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest packages/virtualized-lists.