-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prop to tell Swiper to stay on same card after swipe action #20
Comments
It’s actually quite easy to do so. If you keep cardindex in sync with the swiper in a prent component or in your app state, by not updating the cardindex prop on swipe and by making sure you pass back to the swiper the old cardindex it will still display the same card. But in any way, why would you want to achieve that? |
Nice, I will try that.
I am building an app for my local hockey team where audience will use it to
vote for the best player during the game.
Navigation is Swipe left/right to chose player, Swipe up to place a vote
for current player.
Each user will have for example 10 votes to distribute.
The users are allowed to use all 10 votes on same player, which i think
will be the most common use case, and for useability I would like the card
to stay on the same Player card
Thaks for the great lib anyway!
/Robert
Den sön 6 sep. 2020 kl 15:13 skrev Bogdan Pop <notifications@github.com>:
… It’s actually quite easy to do so. If you keep cardindex in sync with the
swiper in a prent component or in your app state, by not updating the
cardindex prop on swipe and by making sure you pass back to the swiper the
old cardindex it will still display the same card.
But in any way, why would you want to achieve that?
Do you want to revert to the same card, as if user’s not allowed to swipe
and on release you want to revert to the same card instead of swiping?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDUYXMTSWU7UP6H5FLFGJTSEODHBANCNFSM4Q3OWICQ>
.
|
It would be great to have a prop for the Swiper to tell it that it shall stay on the same card (no skip forward in the deck) after a certain Swipe action. For example 4 props named, stayOnSameCardAfterSwipeTop, stayOnSameCardAfterSwipeLeft, stayOnSameCardAfterSwipeRight, stayOnSameCardAfterSwipeBottom.
Love your work! Many thanks!!! :)
The text was updated successfully, but these errors were encountered: