Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow out-of-range initialScrollIndex after first scroll
Summary: The contract here is that `initialScrollIndex` only applies once, right after the components mount. There is other code still relying on live `initialScrollIndex`, which is allowed to become stale. E.g. after removing items. I looked at a larger change of only ever using `initialScrollIndex` in the start, so we have a consistent value. We also ideally should fix up the logic relying on it for the scroll to top optimization. That series of changes is more involved than I want to spend time on, so this just avoids the check once we have triggered a scroll, where the rest of the code is UT'd to be permissive if it drifts out of allowed. Changelog: [General][Fixed] - Allow out-of-range initialScrollIndex after first scroll Reviewed By: yungsters Differential Revision: D43926656 fbshipit-source-id: bd09bd9a9aa6b3b5f07209dac8652c9374a762c4
- Loading branch information