onScroll prop is never called
See original GitHub issueIssue Description
The onScroll
prop is ignored because it is overridden within this module.
onScroll
is internally set to a Reanimated Event, and does not call the onScroll
that is passed as a prop.
Is there any way we can get this to behave the same as a normal FlatList, and still do what is needed internally?
I have created a new issue because the original one #53, DID get fixed but a subsequent update broke it again.
Edit: typos
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13 (11 by maintainers)
Top Results From Across the Web
React-Native onScroll Event is Not Being Called
You need to either bind handleOnScroll function in constructor or change it to arrow function. Bind handleOnScroll in constructor
Read more >ScrollView - React Native
Called when the user stops dragging the scroll view and it either stops or begins to glide. Type. function. onScrollToTop. iOS. . Fires...
Read more >react-scroll - npm
A scroll component for React.js. Latest version: 1.8.9, last published: 15 days ago. Start using react-scroll in your project by running ...
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 >Passing Functions to Components - React
Pass event handlers and other functions as props to child components: ... Why is my function being called every time the component renders?...
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 Free
Top 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
facing the same issue as well. Is there currently a timeline where this issue will be addressed? would love to be able to have something similar to
onScroll
without having to incorporate another library.edit - was able to get it to work as well. here’s a tweaked implementation of @computerjazz 's workaround using hooks
I have not worked on it, but if all you need is a callback with the scrollOffset, you shouldn’t need to fork – you can grab the
scrollOffset
from the ref and then use it in an<Animated.Code>
block:see https://snack.expo.io/@computerjazz/swipetodelete-pkg for an example