akiran / akiran/react-slick

onSwipe is not working

Aperta
#2,433 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
11.9k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I need to determine if the swiper changes via swipe and when I try to use onSwipe, it does not fire.

```
const settings = {
dots: false,
arrows: false,
autoplay: false,
slidesToShow: 1,
slidesToScroll: 1,
swipe: true
swipeToSlide: true
onSwipe: (direction) => {
console.log("Swipe direction:", direction);
if (direction === "left") {
console.log("Swiped left!");
} else if (direction === "right") {
console.log("Swiped right!");
}
},
}




1




2




3




4





```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.