react-native-swiper
react-native-swiper copied to clipboard
Randomly changes page content
Which OS ?
Android and iOS
Version
Which versions are you using:
- react-native-swiper v1.6.0
- react-native v0.66.3
- react-native-animatable: 1.3.3
- react-native-reanimated: 2.3.0-beta.3
- react-native-safe-area-context: 3.3.2
- react-native-screens: 3.9.0
Expected behaviour
Show the correct page and does not automatically change what to show.
Actual behaviour
Shows wrong page even when the dots indicate that another page should be displayed. Automatically changes what page to display even when the user does not swipe the screen. How can it work this randomly?
How to reproduce it
- Each page has a vertical scrollview. Maybe Swiper can't handle this.
Steps to reproduce
- Start the app
@tapz I believe I'm running into this issue as well. I have a modal that pops up but when it does, the page gets indexed back once. It only happens when the modal opens.
im running into this issue too. any ideas? sometimes it gets stuck between two slides too
This is probably because we have scrollviews in the pages and the swiper is implemented using a scrollview. React Native discourages nested scrollviews. I solved the issue by implementing my own swiper, which uses one pages * screen width wide animated view and changes the x offset when swiping. It was pretty simple to implement using react-native-gesture-handler and react-native-reanimated. I probably will make the code available under my github account at some point.
any solution for this?