react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

SectionList wrapped with Animated.createAnimatedComponent doesn't have an scoll methods

Open egadstar opened this issue 3 years ago • 8 comments

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

egadstar avatar Dec 07 '21 00:12 egadstar

Issue validator

The issue is valid!

github-actions[bot] avatar Dec 07 '21 00:12 github-actions[bot]

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

hssrrw avatar May 25 '22 14:05 hssrrw

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

rnike avatar Sep 14 '22 08:09 rnike

The issue is still reproduced on version 2.5.0

MaksDubois avatar Sep 24 '22 19:09 MaksDubois

This seems to be resolved for me in 3.0.0-rc.3.

nmeibergen avatar Oct 26 '22 13:10 nmeibergen

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.

Gilmara-Git avatar Jan 26 '24 02:01 Gilmara-Git

Experiencing this myself too:

version: 3.6.3

ameer2468 avatar Apr 18 '24 15:04 ameer2468