Skip to content

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

Closed
@andreialecu

Description

@andreialecu

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions