Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Uncaught TypeError: scrollToOffset is not a function #5

Open
seame1on opened this issue May 23, 2018 · 1 comment
Open

Uncaught TypeError: scrollToOffset is not a function #5

seame1on opened this issue May 23, 2018 · 1 comment

Comments

@seame1on
Copy link

seame1on commented May 23, 2018

The problem
I want to use scrollToOffset to let the FlatList component scroll to the specified location, but the console shows an error message that scrollToOffset is not a function

<Flatlist
  ref={ f => this.listView = f}
/>
...
this.listView.scrollToOffset({
  animated: false,
  offset: 0,
})

Environment

  • React Native for Web (version):0.5.4
  • React (version):16.0.0-alpha.12
@Minishlink
Copy link
Member

Thanks for the feedback. The refs are not forwarded in FlatList and SectionList. Can you send a PR?

Alternatively, try the new experimental FlatList of react-native-web 0.6+

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants