From 39a5fe446ccb25ffdcb5e9ac13544364024bd780 Mon Sep 17 00:00:00 2001 From: yucheng1207 <40053981+yucheng1207@users.noreply.github.com> Date: Mon, 30 Jul 2018 15:19:44 +0800 Subject: [PATCH] Update ScrollView.web.js fix scrollEventThrottle bug --- Libraries/ScrollView/ScrollView.web.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Libraries/ScrollView/ScrollView.web.js b/Libraries/ScrollView/ScrollView.web.js index f915e62..97bf00c 100644 --- a/Libraries/ScrollView/ScrollView.web.js +++ b/Libraries/ScrollView/ScrollView.web.js @@ -159,7 +159,11 @@ class ScrollView extends Component { let handleScroll = () => {}; if (this.props.scrollEventThrottle && this.props.onScroll) { - handleScroll = throttle(this.handleScroll, this.props.scrollEventThrottle ? 1000 / this.props.scrollEventThrottle : 1000); + if (this.props.scrollEventThrottleDisable) { + handleScroll = this.handleScroll; + } else { + handleScroll = throttle(this.handleScroll, this.props.scrollEventThrottle ? 1000 / this.props.scrollEventThrottle : 1000); + } } let props = {