Bug: variableWidth + infinite results in slides in wrong position...
Depending on the width of the container, you'll typically get the last slide showing up in the first position, or perhaps the second to last slide. Either way, it's not the first slide.
Also, if you turn off infinite, then it works fine. Only an issue when variableWidth and infinite enabled.
See this to reproduce: https://jsfiddle.net/a3azf02k/1/
+1
+1
I also get this same issue, and when I disable infinite I get the same problem while pressing the back arrow.
Any updates on this?
Having the same issue 😞
By the way, if you resize the window after the page is loaded it gets fixed, maybe it could help in fixing the bug.
Having the same issue. Adding initialSlide={1} seems to be a workaround.
Another quick workaround for me was to do define a ref for the slider component, access innerSlide and call slickGoto(1):
componentDidMount() {
setTimeout(() => {
this.slider.innerSlider.slickGoTo(1);
}, 0);
}
Had to use zero setTimeout because I wanted to make sure that the slider gets fully initialised first.
Similarly you can call this.slider.innerSlider.slickNext().
Similar problems have been fixed in previous releases. Please feel free to request reopen if disagree.