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

weird glitch when using useState with another component on the same screen

Open alexisbl14 opened this issue 2 years ago • 2 comments

Which OS ?

developing on Windows, testing with expo on iOS

Version

Which versions are you using:

  • react-native-swiper v1.6.0-rc
  • react-native v0.64.3

Expected behaviour

when clicking a checkbox (bouncy checkbox or pressable) and updating with setState, the current page should not move slightly to the left

Actual behaviour

when clicking a checkbox (bouncy checkbox or pressable) and updating with setState, the current page moves slightly to the left as if someone started swiping it, and it stays there

How to reproduce it>

To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.

Steps to reproduce

  1. have slider component as a part of the page
  2. add in some kind of button that updates the state
  3. see how the 2nd page or higher shifts slightly left

alexisbl14 avatar May 22 '22 22:05 alexisbl14

https://github.com/leecade/react-native-swiper/issues/1266 Add this prop to swiper loadMinimal={true}

talhamujahid52 avatar May 30 '22 08:05 talhamujahid52

https://github.com/leecade/react-native-swiper/issues/1215#issuecomment-686793558 Worked:

In my package.json I changed: "react-native-swiper": "^1.6.0", to "react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",

pankaj9singh avatar Aug 01 '22 07:08 pankaj9singh