akiran / akiran/react-slick

slickGoTo has the wrong animation direction when moving from the first to last index

Aperta
#1,869 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug priority: High
Lingua principale
JavaScript
Stelle
11.9k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### "slickGoTo" has the wrong animation direction when moving from the first to last index and from last to first

Codesandbox example: https://codesandbox.io/s/slickgoto-issue-dhf76
Steps to reproduce:

- Go to https://dhf76.csb.app/
- Click on 1, 2, 3 and you'll see that the animation works ok
- Now try clicking on 1 and then 10
Current result: The animation moves to the right from 1 all over to 10.
Expected result: The animation moves to the left just 1 slide.

This happens either way if infinite is set to true in center mode

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.