fixt / react-native-page-swiper

91 stars 47 forks source link

Implement controlled usage #8

Closed esamattis closed 5 years ago

esamattis commented 8 years ago

and rename index prop to initialIndex.

Maybe a bit lame implementation as it just syncs the prop to state but the changeset for this was trivial and from the consumer's perspective the is api stateless.

Closes https://github.com/fixt/react-native-page-swiper/issues/5

esamattis commented 8 years ago

Updated the pull request a bit. Now if the user tries to swipe to a next slide and the controlling component does not update the index the slide is bounced back.

tlvenn commented 8 years ago

@cgarvis any chance to merge this PR soon ? Thanks

adrienthiery commented 8 years ago

@cgarvis : Would be awesome if it was merged indeed!

cgarvis commented 8 years ago

I'll look into this tonight.

On Fri, Feb 12, 2016 at 5:57 PM Adrien Thiery notifications@github.com wrote:

@cgarvis https://github.com/cgarvis : Would be awesome if it was merged indeed!

— Reply to this email directly or view it on GitHub https://github.com/fixt/react-native-page-swiper/pull/8#issuecomment-183518091 .

adrienthiery commented 8 years ago

Thanks, that would save my day!

tlvenn commented 8 years ago

Any update @cgarvis ?

esamattis commented 5 years ago

Up to date pr in #22.