react-native-macos/Libraries/Lists
Vojtech Novak 8a82503b54 fix SectionList scrollToLocation and prevent regressions (#25997)
Summary:
Recently there were quite a few changes to this functionality, and they caused breakages

https://github.com/facebook/react-native/issues/21577
https://github.com/facebook/react-native/issues/24034
https://github.com/facebook/react-native/issues/24734
https://github.com/facebook/react-native/issues/24735

Currently,  whichever `viewOffset` I pass, it will be overridden (either by 0 or something computed in the if body). This fixes the issue and also adds tests to make sure there is no regression.

## Changelog

[Javascript] [Fixed] - VirtualizedSectionList scrollToLocation viewOffset param ignored
Pull Request resolved: https://github.com/facebook/react-native/pull/25997

Test Plan: tests pass

Differential Revision: D16784036

Pulled By: cpojer

fbshipit-source-id: 46421250993785176634b30a2629a6e12f0c2278
2019-08-13 07:52:54 -07:00
..
__flowtests__ xplat/js/react-native-github 2019-08-09 10:11:15 -07:00
__tests__ fix SectionList scrollToLocation and prevent regressions (#25997) 2019-08-13 07:52:54 -07:00
FillRateHelper.js Manual fixes for xplat/js/react-native-github 2019-08-09 10:11:15 -07:00
FlatList.js Manual fixes for xplat/js/react-native-github 2019-08-09 10:11:15 -07:00
SectionList.js fix SectionList scrollToLocation and prevent regressions (#25997) 2019-08-13 07:52:54 -07:00
ViewabilityHelper.js Fixes 'Invalid render range' crash (#22847) 2019-01-21 01:58:54 -08:00
VirtualizeUtils.js Use `invariant` instead of `fbjs/lib/invariant` 2018-12-03 00:07:02 -08:00
VirtualizedList.js improve VirtualizedList error message (#25973) 2019-08-12 04:34:25 -07:00
VirtualizedSectionList.js fix SectionList scrollToLocation and prevent regressions (#25997) 2019-08-13 07:52:54 -07:00