I render a deck of yellow cards, if I press on a card I go to another page (with react-native-navigation v5) where I see a video (youtube in a webview). I open it in fullscreen, and change the orientation of the device to landscape.
I then leave the video, go back to portrait mode. I go back to the swiper. Cards are now shifted to the right by almost half a screen, and I see the blue background of the swiper.
Any idea on how to fix ? I tried to force update my component by triggering a change of state, but since I have a ref on the swiper, it does not change anything. I also tried with the ref to call "forceUpdate" function on swiper, but nothing happens.
The swiper takes its size based on the device screen size, so rotating the device will result in what you're describing. You can fix this by re-initialising the swiper after a rotate has happened.
Hello !
I have a bug on my app :
I render a deck of yellow cards, if I press on a card I go to another page (with react-native-navigation v5) where I see a video (youtube in a webview). I open it in fullscreen, and change the orientation of the device to landscape. I then leave the video, go back to portrait mode. I go back to the swiper. Cards are now shifted to the right by almost half a screen, and I see the blue background of the swiper.
before screen :
after screen :
Here is a video : https://drive.google.com/file/d/1WXwO6JGZke_YLonKWc7aoTs7g1XVOOzD/view?usp=sharing
Any idea on how to fix ? I tried to force update my component by triggering a change of state, but since I have a ref on the swiper, it does not change anything. I also tried with the ref to call "forceUpdate" function on swiper, but nothing happens.