React-slick: problem with uneven slides , when slideToScroll is set

Created on 11 Jul 2020  路  2Comments  路  Source: akiran/react-slick

The problem can be seem in the sandbox HERE

Basically with the following settings:

const settings = {
  slidesToShow: 1,
  slidesToScroll: 3,
  infinite: false,
};
// keep in mind slideCount is 14 in my example

The following occurs:
Click next 1st time :- moves to slide 4 - intended behaviour
Click next 2nd time :- moves to slide 7 - intended behaviour
Click next 3rd time :- moves to slide 10 - intended behaviour
Click next 4th time :- moves to slide 13 - intended behaviour
Click next 5th time :- moves to slide 16 (non existent slide) - non-intended behaviour

P.S. not sure why somebody would have these settings as its a bit odd , nevertheless the issue exists and would be great to have it fixed. I have a solution in mind and could raise a PR , let me know.

bug

Most helpful comment

+1 I encountered this issue as well. Works well if the slidesToShow = slidesToScroll.

All 2 comments

+1 I encountered this issue as well. Works well if the slidesToShow = slidesToScroll.

@gautamz07 Do send a PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vugman picture vugman  路  3Comments

laveesingh picture laveesingh  路  3Comments

artemidas picture artemidas  路  4Comments

rohitgoyal7 picture rohitgoyal7  路  3Comments

darkalor picture darkalor  路  4Comments