Zygro
Zygro

Reputation: 7119

How to start listview scrolled to a certain position in react-native

I've tried initialOffset, calling refs.list.scrollTo (which error says is undefined)but none of them work, although they are just fine in scrollview.

How can this be done?

Upvotes: 5

Views: 738

Answers (1)

Zygro
Zygro

Reputation: 7119

I figured it out. It's possible with this.refs.list.refs['listviewscroll'].scrollWithoutAnimationTo(vertical, horizontal)

there may be some other, easier way but this one works fine for react-native 0.10.0

Upvotes: 2

Related Questions