Files
react-native/Libraries
Nick Gerleman 0cfe5ae526 Allow empty cell ranges in CellRenderMask.addCells()
Summary:
VirtualizedList state is represented in terms of [first, last] ranges, where it is possible to express a zero-cell range by having [n, n-1]. This includes some awkward examples, like [0, -1] being valid.

CellRenderMask assumes `addCells` is called with at least one cell, with VirtualizedList previously guarding against adding the no cell case. This guard is present for adding main cell regions, but not for `_initialRenderRegion()`, which can be overridden to have a zero length as well.

This moves the `CellRenderMask` to be permissive of zero-length cell regions, and removes the caller guard.

Changelog:
[Internal][Fixed] - Allow empty cell ranges in CellRenderMask

Reviewed By: rshest

Differential Revision: D38184444

fbshipit-source-id: d2dadfdd9628b24f894126d63b1eb93f6387b877
2022-07-28 11:08:18 -07:00
..
2022-07-14 17:00:28 -07:00
2022-04-05 12:15:05 -07:00
2022-04-05 12:15:05 -07:00
2022-07-05 13:03:11 -07:00