react-native-swiper icon indicating copy to clipboard operation
react-native-swiper copied to clipboard

Randomly changes page content

Open tapz opened this issue 3 years ago • 4 comments

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

  1. Start the app

tapz avatar Nov 25 '21 13:11 tapz

@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.

lundjrl avatar Nov 29 '21 17:11 lundjrl

im running into this issue too. any ideas? sometimes it gets stuck between two slides too

erthiph avatar Dec 15 '21 08:12 erthiph

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.

tapz avatar Dec 15 '21 08:12 tapz

any solution for this?

mahadevsempire avatar Apr 02 '22 11:04 mahadevsempire