Closed amitk7407 closed 9 months ago
Hi,
I have got a workaround for this issue, so sharing it thinking it may help.
Suppose, slidesToShow = totalSlides = 3
, then instead of passing 3
to slidesToShow
, we can pass 2.99
which will show arrows and dots and add cloned slides. And if you are using centerMode: true
, then the slides in this case will not be centered so for this, add css like:
.slick-slide { transform: translate(100%, 0); }
This will move your slide by 1 which works in case of 3 visible slides. You can translate
based of your number of visible slides.
+1, I have the same issue. The workaround method from @amitk7407 is working 👍
+1, SAME ISSUE
Same issue. Although @amitk7407 solution made my slider infinite.. it doesn't look good because it is cut
+1, same issue.
It has been resolved in the latest version! Now you can use infinite
even when 'element' and slideToShow
are the same.
Fixed in react-slick@0.30.0
demo: https://codesandbox.io/s/react-slick-playground-yjk35?file=/index.js
Even after using
{ arrows: true, dots: true, infinite: true}
whenslideToShow
equals to the length of slides, no pre/post cloned slides are being rendered which usually happens when infinite is set to true. Arrows and Dots are also not being rendered in this case.