From 15fd1c9a48316a21590042ba07279ee05fec0404 Mon Sep 17 00:00:00 2001 From: roscioli Date: Sat, 8 Oct 2016 19:34:38 -0400 Subject: [PATCH] Add optional custom listener if needed --- lib/ParallaxView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ParallaxView.js b/lib/ParallaxView.js index 776bdb3..fc0d412 100644 --- a/lib/ParallaxView.js +++ b/lib/ParallaxView.js @@ -123,7 +123,8 @@ var ParallaxView = React.createClass({ {...props} style={styles.scrollView} onScroll={Animated.event( - [{ nativeEvent: { contentOffset: { y: this.state.scrollY }}}] + [{ nativeEvent: { contentOffset: { y: this.state.scrollY }}}], + {listener: this.props.onScroll} )} scrollEventThrottle={16}> {this.renderHeader()}