alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swipe back only left swiped cards

sunviwo opened this issue · comments

Hi,
I notice the swipeBack callback that helps to get back to the deck the last swiped card. What I'd like to do is apply the swipeBack feature to cards swiped to left side only. Is there a way to achieve this ? Thanks in advance.

@sunviwo swipeBack is not a callback. It is a method of the Swiper that you can call, and it has an argument (callback function that is automatically called after the swipe back occurs.

Therefore, if you want to only allow cards swiped to left to be brought back you need to make sure that your button that triggers the swiper's swipeBack call can be pressed, or is visible only after users have swiped left.