Remove sendMomentumEvents property from public ScrollView properties

Summary: This property is only used by the native code as an optimization to not send events that no one is listening to.  We don't need to expose it externally on the js api.  Set sendMomentumEvent to be a native only property.

Reviewed By: bestander

Differential Revision: D3092650

fb-gh-sync-id: 95f5f0ae4cd04a7d1cbc9cf17c93647d3c644878
shipit-source-id: 95f5f0ae4cd04a7d1cbc9cf17c93647d3c644878
This commit is contained in:
Dave Miller 2016-03-24 05:42:40 -07:00 committed by Facebook Github Bot 3
parent 993835c815
commit bd8007300f
1 changed files with 4 additions and 9 deletions

View File

@ -251,13 +251,6 @@ var ScrollView = React.createClass({
* @platform ios
*/
scrollsToTop: PropTypes.bool,
/**
* When true, momentum events will be sent from Android
* This is internal and set automatically by the framework if you have
* onMomentumScrollBegin or onMomentumScrollEnd set on your ScrollView
* @platform android
*/
sendMomentumEvents: PropTypes.bool,
/**
* When true, shows a horizontal scroll indicator.
*/
@ -555,10 +548,12 @@ var styles = StyleSheet.create({
});
if (Platform.OS === 'android') {
var AndroidScrollView = requireNativeComponent('RCTScrollView', ScrollView);
var nativeOnlyProps = { nativeOnly : { 'sendMomentumEvents' : true } };
var AndroidScrollView = requireNativeComponent('RCTScrollView', ScrollView, nativeOnlyProps);
var AndroidHorizontalScrollView = requireNativeComponent(
'AndroidHorizontalScrollView',
ScrollView
ScrollView,
nativeOnlyProps
);
} else if (Platform.OS === 'ios') {
var RCTScrollView = requireNativeComponent('RCTScrollView', ScrollView);