akiran / akiran/react-slick

onSwipe is not working

Open
#2,433 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11.9k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

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





```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.