react-native-reanimated
react-native-reanimated copied to clipboard
SectionList wrapped with Animated.createAnimatedComponent doesn't have an scoll methods
Description
If you wrap SectionList with Animated.createAnimatedComponent, the methods to scroll the list are no longer accessible from the ref. Based on past issues related to FlatList, I assume this is a similar issue.
Expected behavior
Expect to be able to scroll the SectionList using any of the methods from SectionList or the VirtualizedList documentation.
Actual behavior & steps to reproduce
Attempting to call any method on the ref results in undefined error.
Snack or minimal code example
https://snack.expo.dev/4C3ChMMG6
Package versions
- React Native: 0.66.1
- React Native Reanimated: 2.2.4
Affected platforms
- [X] Android
- [X] iOS
- [X] Web
Issue validator
The issue is valid!
This is still an issue in 2.8.0. Did anyone manage to find a workaround? I wonder how people use virtualized lists with reanimated. I can't make either FlatList nor SectionList work
I am also facing an issue that might be related to this, after using createAnimatedComponent
the reference of ref
becomes unexpected, I am on the version 2.4.1
The issue is still reproduced on version 2.5.0
This seems to be resolved for me in 3.0.0-rc.3.
I am facing the same issue react-native-reanimated": "~3.3.0,
and react-native": "0.72.6
Has anybody seem a workaround for this ?
I needed to user ref
to make my SectionList
scroll to a certain index
, but no goal.
Experiencing this myself too:
version: 3.6.3