You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want my user to be able to go backward on the cards, but is there a way to disable bottom swipe just for the first card? if the user swipes down on the first card as of now nothing would appear on the screen
The text was updated successfully, but these errors were encountered:
Yes, save the swipe index on the state, so the initial is 0.
And the swiper has a prop called disableBottomSwipe along with other props for disabling each direction.
So you can write:
//the state: const [cardIndex,setCardIndex] = useState(0) //the Swiper <Swiper onSwiped = {()=>setCardIndex(cardIndex+1)} disableBottomSwipe={cardIndex === 0} //rest of the props />
I want my user to be able to go backward on the cards, but is there a way to disable bottom swipe just for the first card? if the user swipes down on the first card as of now nothing would appear on the screen
The text was updated successfully, but these errors were encountered: