akiran / akiran/react-slick

center mode not working when slides are equal to slidesToShow or less than that

Đang mở
#2,102 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ả

Hi,

Am using React-slick but facing an issue when center mode is true and total slide is only 3 and slides to show is also 3. At that time center mode behavior is weird.

I have,

`

`

$thumnailContainer.slick({
slidesToShow: 3,
slidesToScroll: 1,
arrows: true,
infinite: true,
dots: false,
centerMode: true,
focusOnSelect: true,
});

The problem is that when I have the same number of slides and slidesToShow the class 'slider-center' is not removed.

### Guidelines for posting a new issue

* Please replicate your issue with this [CodeSandBox](https://codesandbox.io/s/ppwkk5l6xx) and provide a link to it along with the issue description

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.