zachgibson / react-native-parallax-swiper

Paged Parallax Swiper with Effects
MIT License
623 stars 76 forks source link

Add `onMomentumScrollToIndex` callback #15

Closed bobmulder closed 6 years ago

bobmulder commented 6 years ago

This callback has been added to keep track of the current index.

Personally this callback is needed because I'm using animations at the foreGround component. When this animation is triggered the swiper scrolls back to the scrollToIndex's value. Via this callback you are able to track the current index, and pass it back to the component.

bobmulder commented 6 years ago

Closing this PR since onMomentumScrollEnd does the exact same thing (I thought it only triggered on the end of the list but it does on the end of every 'swipe')