software-mansion/react-native-reanimated

Android: `scrollTo` with FlatList breaks as soon as refresh control is added

andreialecu opened this issue · 3 comments

Description

Using scrollTo with a normal FlatList seems to work great, just until it gets a RefreshControl.

This only seems to occur on Android. On iOS everything works fine.

Screenshots

Steps To Reproduce

const AnimatedFlatList = Animated.createAnimatedComponent(FlatList)

<AnimatedFlatList
      ref={ref}
      ...
      onRefresh={() => {}} // comment out and it scrolls
      refreshing={true}    //
    />

scrollTo(ref, ...) // on android it only scrolls when refresh control is missing

Expected behavior

Programmatic scrolling should work.

Actual behavior

Nothing happens.

Snack or minimal code example

See above.

Package versions

  • React Native: via Expo 40.0.1
  • React Native Reanimated: 2.0.0-rc.0

Only occurs on Android

Issue validator

The issue is valid!

I have the same issue here on rc.0

Note that ScrollView works fine. Only FlatList is affected.