alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
1.56k stars 465 forks source link

Cards not rendering straight #334

Open sturrock opened 4 years ago

sturrock commented 4 years ago

When the Swiper renders the cards they are coming out weird, sometimes it works but most the time it doesn't. You cant swipe it either.

I noticed it does it when you open the app, then once you refresh the app with Ctrl+R it fixes itself. Its rendering the first card as the swipeBackCard then its rendering the other cards with rotation, and out of order indexes.

Any ideas whats going on and is there a fix?

chun-baoluo commented 2 years ago

I have only one card in my stack, but calling this after card swipe helped me:

swiperRef.state.pan.setOffset({ x: 0, y: 0 });