akiran / akiran/react-slick

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

未关闭
#2,102 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
11.9k
派生
2.1k
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。