akiran / akiran/react-slick

Changing slide works incorrect when infinite is false and initialSlide > 1

Đang mở
#1,946 12 bình luận 8 reaction 0 người được giao Xem trên GitHub
bug priority: High
Ngôn ngữ chính
JavaScript
Star
11.9k
Fork
2.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Changing slide when initialSlide > 1 and infinite is false works wrong.
When I swipe right I expect to see next slide(initial + 1), but I always see second slide as next, when I swipe left, I always get first slide.
Also same behaviour when I click on arrows on this [example](https://codesandbox.io/s/ppwkk5l6xx?file=/index.js), but with initialSlide: 2, infinite: false.
I think that same behaviour we have always when initial slide is set and infinite setting is false.

[Link](https://stackblitz.com/edit/react-brc9ys?file=src%2FApp.js) to stackblitz to reproduce. https://stackblitz.com/edit/react-brc9ys?file=src%2FApp.js
Versions:
- react-slick: 0.27.13
- react: 17.0.1

Is any recipes how to solve it?
Similar issue: https://github.com/akiran/react-slick/issues/1874

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.