n4kz / react-native-pages

Easy to use page view component
Other
377 stars 83 forks source link

Start Page #6

Closed zoecarver closed 7 years ago

zoecarver commented 7 years ago

Is there a way to set a starting page? For example, if I have three different horizontal pages, but I want to start on the second one, how would I do this?

Thanks!

n4kz commented 7 years ago

Not implemented yet. I'll try to support configurable start page in next release.

nicolastakashi commented 7 years ago

This is very useful.

I tried to make an implementation to send a pullrequest.

Basically what I did was pass via props a startIndex and make a conditional on this.progress that got something like that.

this.progress = this.props.startIndex? This.props.startIndex: 0;

It passes to the scrollToView with the right index but it does not render right, it only renders on the page I chose if I refresh the App.

If you can give me a hint why this behavior, I can try to implement and send a Pull Request.

n4kz commented 7 years ago

Released in 0.5.1