race604 / react-native-viewpager

[Deprecated] ViewPager component for React Native
1.41k stars 373 forks source link

Event before onChangePage #36

Open lopezjurip opened 8 years ago

lopezjurip commented 8 years ago

It would be awesome to fire an event when the transition begins. Something like onChangePageBegin

bondanherumurti commented 8 years ago

i need this... because it could be useful to control "others" information component such as segmentControl, onChangePage seems left behind to fire control on other component, it sacrifices the UX

http://recordit.co/l53eGrDhoO

hehex9 commented 8 years ago

Maybe we can use the prop named hasTouch for these user case.

I found that in the source code 👉 https://github.com/race604/react-native-viewpager/blob/master/ViewPager.js#L99.

And...

It should be documented.

😢

[edit]

Sorry guys, I just realized that hasTouch is only works with autoPlay=false.

hasTouch wont be called when we set autoPlay to true.

sigh.