Closed egorovsa closed 1 year ago
I got the same issue, anyone can fix it?
have you got the solution? @egorovsa
Yes I found a solution, but this is.... how to say . Temp Monkey patching. But this works for me. Instead of using initialSlide prop I use ref and Slider API. Check this out
// Since the slider's plugin has an initialSlider property setting issue
// we set an initial slide using the package API
// Issue is created https://github.com/akiran/react-slick/issues/2207
const initSlider = (ref: Slider) => {
ref?.slickGoTo(initialSlide || 0, true);
};
//...
<Slider
ref={initSlider}
dots={false}
infinite={false}
>
...
Let me have a look @akiran Please assign and please give an overview what needs to be fixed 😄
this issue has been fixed.
1) infinite=false 2) set InitialSlide 3) swipe right
Expected result: it goes to the next slide Actual result: it always goes to slide 2
Reproduced there!
https://codesandbox.io/s/react-slick-playground-forked-8lnxbb?file=/index.js