From f186cfb9d657bacafa32588b96de6ddac0786cf8 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Mon, 3 Apr 2017 18:36:26 -0700 Subject: [PATCH] Allow override of `scrollEventThrottle` (in case `useNativeDriver` is not an option) Reviewed By: achen1 Differential Revision: D4819635 fbshipit-source-id: 9cc7b32e05bf2c573553b9806a17141f1783a1c6 --- Libraries/Lists/VirtualizedList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 4e039729d..5adabc671 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -272,6 +272,7 @@ class VirtualizedList extends React.PureComponent { return ; } }, + scrollEventThrottle: 50, updateCellsBatchingPeriod: 50, windowSize: 21, // multiples of length }; @@ -448,7 +449,7 @@ class VirtualizedList extends React.PureComponent { onScroll: this._onScroll, onScrollBeginDrag: this._onScrollBeginDrag, ref: this._captureScrollRef, - scrollEventThrottle: 50, // TODO: Android support + scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support stickyHeaderIndices, }, cells,