react-native/Libraries/Components/ScrollView
James Reggio 9733b92f3d Add `onScrollToTop` to ScrollView for iOS (#21204)
Summary:
This PR exposes the `onScrollToTop` event on iOS using the same event-forwarding infrastructure as other ScrollView events. (As such, its `nativeEvent` object reflects the same fields as other ScrollView events.)

Motivation:
----------

If your app is only interested in knowing the position of a ScrollView after a scroll has completed, it can use `onScrollEndDrag` and `onMomentumScrollEnd` to inspect the `contentOffset` after a drag-initiated scroll has finished. (This is much less expensive than observing the `onScroll` event if you only want to know the end position.) However, neither of these `End` events fire if the ScrollView is scrolled to the top by tapping the status bar.

By exposing `onScrollToTop`, it is now possible for an app to cheaply know when such a scroll has completed.
Pull Request resolved: https://github.com/facebook/react-native/pull/21204

Differential Revision: D9943618

Pulled By: hramos

fbshipit-source-id: ac5ee42b7f12d94655ffda617f8f811138da7f6f
2018-09-19 11:17:30 -07:00
..
__mocks__ Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
InternalScrollViewType.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
ScrollView.js Add `onScrollToTop` to ScrollView for iOS (#21204) 2018-09-19 11:17:30 -07:00
ScrollViewStickyHeader.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
processDecelerationRate.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00