react-native/Libraries/Lists
Shane Osbourne dbc23466b3 fix: account for `ListHeaderComponent` length when calculating offset… (#17415)
Summary:
… in VirtualizedList - fixes #16612

Issue is detailed in #16612

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I need `onViewableItemsChanged` to account for the length of any ListHeaderComponents

I couldn't find any tests that currently cover the use-case of a VirtualizedList + ListComponent + scroll with onViewableItemsChanged, so I have not added any tests - all previous tests pass however.

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[GENERAL][BUGFIX][VirtualizedList] - account for `ListHeaderComponent` length
Closes https://github.com/facebook/react-native/pull/17415

Differential Revision: D8683555

Pulled By: hramos

fbshipit-source-id: 05df7b79c16e3c07c12468e782f3c4b0bdce7403
2018-06-28 15:32:39 -07:00
..
ListView Flowtype ListView 2018-05-14 00:24:44 -07:00
__flowtests__ Update license headers for MIT license 2018-02-16 18:31:53 -08:00
__tests__ Update Jest snapshots 2018-05-29 17:30:16 -07:00
FillRateHelper.js Remove @providesModule from all modules 2018-04-25 07:37:10 -07:00
FlatList.js Bump Prettier to 1.13.4 on xplat 2018-06-06 05:32:06 -07:00
MetroListView.js Flowtype ListView 2018-05-14 00:24:44 -07:00
SectionList.js Flowtype ListView 2018-05-14 00:24:44 -07:00
ViewabilityHelper.js Remove @providesModule from all modules 2018-04-25 07:37:10 -07:00
VirtualizeUtils.js Remove @providesModule from all modules 2018-04-25 07:37:10 -07:00
VirtualizedList.js fix: account for `ListHeaderComponent` length when calculating offset… (#17415) 2018-06-28 15:32:39 -07:00
VirtualizedSectionList.js Bump Prettier to 1.13.4 on xplat 2018-06-06 05:32:06 -07:00