onScroll not triggering react native android
See original GitHub issueHi,
I added onScroll event to RecyclerListView
to implement collapsible navbar. Buth the OnScroll
prop is not triggering. Below is the code
<RecyclerListView
layoutProvider={this._layoutProvider}
dataProvider={this.state.dataProvider}
rowRenderer={this._rowRenderer}
onEndReached={() => this.handleLoadMore()}
onEndReachedThreshold={0.1}
renderFooter={this.renderFooter}
refreshControl={<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this._onRefresh.bind(this)}
showsVerticalScrollIndicator={false}
contentContainerStyle={{paddingTop: NAVBAR_HEIGHT}}
onscroll={Animated.event(
[{nativeEvent: {contentOffset: {y: this.scroll}}}],
{useNativeDriver: true},
)}
/>
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
ReactNative ScrollView onScroll works fine for IOS but for ...
ScollView to behave like a bottomSheet in Reactnative by using onScroll function in ... But for Android it is not event triggering onScroll....
Read more >ScrollView - React Native
Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
Read more >Common bugs in React Native ScrollView and how to fix them
Correctly using onScroll and tracking scroll position may be a tricky task due to performance reasons. This is why it's always important to ......
Read more >React onScroll example - CodePen
This is a demonstration of how to get onScroll to work with a React Component. The div that I've created gets the scrollTop...
Read more >useAnimatedScrollHandler | React Native Reanimated
event [object] - event object carrying the information about the scroll. The payload can differ depending on the type of the event (...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
onScroll
gets overridden by RLV internally. If you look at the contract that @AbdallaMohamed mentioned you cannot pass anAnimated.event
value. You however can extend a ScrollView on your own to achieve this. Look at the following:This should work. Try it.
Hi, I have created collapsible header with these examples using react-native standard Animated library. I want to switch to react-native-reanimated, but I’m facing a problem, that onEndReached is no longer triggering. My guess there is a conflict with reanimated’s Animated.ScrollView, any tips in fixing/debugging this issue?