alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If I swipe only left after swiping all cards it still allows to trigger swiperRef.swipeLeft()... so it throws a TypeError

mattproch opened this issue · comments

If I swipe only left (gesture or manually trigger swipeLeft) after swiping all cards it still does allow me to manually trigger all the swipe methods (swiperRef.swipeLeft()...) and than it throws TypeError: undefined is not an object (evaluating result.id) cause it actually tries to render the card. If I do even just one swipe right it does not. There is probably an error with handling the swipe left method and the number of remaining cards. The thing is that swipe left actually does trigger onSwipedAll but somehow still allows swiping with methods.

My solution for now is to have the onSwipedAll method implemented and disable the buttons after that.

Expected behaviour is to swipe left behave same as swipe right.