Open MaxiSanchezR opened 1 year ago
What I've understand from the docs is that I have to use this method with a reference to the swiper. But this code is not working.
const CustomSwiper = () => { // ...
const jumpToStart = () => { swiperRef.current?.jumpToCardIndex(0); };
return ( <Swiper ref={swiperRef} cards={users} onSwipedAll={jumpToStart} // Other swiper props... /> ); };
What I've understand from the docs is that I have to use this method with a reference to the swiper. But this code is not working.
const CustomSwiper = () => { // ...
const jumpToStart = () => { swiperRef.current?.jumpToCardIndex(0); };
return ( <Swiper ref={swiperRef} cards={users} onSwipedAll={jumpToStart} // Other swiper props... /> ); };