mirror of
https://github.com/status-im/react-native.git
synced 2025-01-11 01:56:26 +00:00
8799047dd0
Summary: `FlatList` (actually `VirtualizedList`) allows recursive nesting of itself for easy and complex composition of lists such that it can support seemless virtualization and VPV events. It does this by only rendering a `ScrollView` for the outermost `VirtualizedList` and simply stacking `View`s for all the internal ones. However, if a `Modal` is in a `FlatList` and also hosts a `FlatList`, e.g.: ``` <FlatList ListFooterComponent={<Modal><Foo /></Modal>} /> ``` Then React context will propogate through to the inner `FlatList` and cause it to render as a plain `View`. Because the `Modal` actually portals the views into a different native hierarchy, one without a `ScrollView`, the `FlatList` won't scroll as expected. The fix is to wipe out the context - not sure if there is a better way, but this doesn't seem terrible. Differential Revision: D7863625 fbshipit-source-id: 38f41d72ed32b9f0eb1c9c82893f21d83a83f9ad