Allow override of `scrollEventThrottle` (in case `useNativeDriver` is not an option)

Reviewed By: achen1

Differential Revision: D4819635

fbshipit-source-id: 9cc7b32e05bf2c573553b9806a17141f1783a1c6
This commit is contained in:
Spencer Ahrens 2017-04-03 18:36:26 -07:00 committed by Facebook Github Bot
parent bc1ea548d0
commit f186cfb9d6
1 changed files with 2 additions and 1 deletions

View File

@ -272,6 +272,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
return <ScrollView {...props} />;
}
},
scrollEventThrottle: 50,
updateCellsBatchingPeriod: 50,
windowSize: 21, // multiples of length
};
@ -448,7 +449,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
onScroll: this._onScroll,
onScrollBeginDrag: this._onScrollBeginDrag,
ref: this._captureScrollRef,
scrollEventThrottle: 50, // TODO: Android support
scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support
stickyHeaderIndices,
},
cells,