akiran / akiran/react-slick

slickNext/slickPrev not working as expected

Aperta
#2,166 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
11.9k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The `slickPrev()` and `slickNext()` functions do not behave as expected if `initialSlide` is set to something other than `0`, and `infinite` is `false`. This behavior is only seen the first time the 👈 or 👉 button is pressed (i.e. after a page refresh).

With an `initialSlide` of `2`, the buttons behave as follows:
- Previous - Goes to slide 0
- Next - Goes to slide 1

Note: `goTo()` still works as expected

[CodeSandbox example](https://codesandbox.io/s/react-slick-bug-31r8d2)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.