mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
8b39bfadbb
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Changelog: [General][Fixed] - Fix virtualization logic with horizontal RTL lists Reviewed By: vincentriemer Differential Revision: D46586420 fbshipit-source-id: 79594e197d21871bb493399999e91fc0d6c7b050
@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.