akiran / akiran/react-slick

onSwipe is not working

Đang mở
#2,433 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
11.9k
Fork
2.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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





```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.