mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
df7b6ae092
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47965 Changelog: [General] [Changed] - fix item disappearing with scroll in VirtualizedList It was caused because the function `computeWindowedRenderLimits` collapsed the current window size to just 1 element. So, users start scroll current window increase from {left:0, right:5 } -> {left:0, right:6 } and after some edge cases the window collapsed to `{left:6, right:6 }` which cause to remove all elements and recreate them later. As a result users have a lot of lags and blank pages. The diff fixes the collapsing window size to 1 element. Also fix other decreasing `left` position even if windowSize more than current amount of elements. Reviewed By: NickGerleman Differential Revision: D66334188 fbshipit-source-id: 2162d00d03d64ab6325c0492d87449051e68a4e9
@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.