zachgibson / react-native-parallax-swiper

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

Stop index changing on state change #44

Closed nickmccomb closed 4 years ago

nickmccomb commented 4 years ago

Is there any way to stop the swiper from scrolling back to index 0 if the object it's mapped from is updated?

I'd like to keep it on the same index because the array length isn't changing, i'm just updating properties on each item in the array.

nickmccomb commented 4 years ago

If anyone else is having this issue just uncomment

componentWillReceiveProps(nextProps) {
    // this.scrollToIndex(nextProps.scrollToIndex);
}