Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
priyadarshiniMuthuraman opened this issue Nov 16, 2021 · 0 comments

Comments

@priyadarshiniMuthuraman

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,

`

            <div class="thumbnail ">
                <img src="../images/one.png" alt="pic_one" />
            </div>
            <div class="thumbnail ">
                <img src="../images/two.png" alt="pic_two" />
            </div>
            <div class="thumbnail ">
                <img src="../images/three.png" alt="pic_three" />
            </div>        
        </div>`

$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 and provide a link to it along with the issue description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant