akiran / akiran/react-slick

slickNext/slickPrev not working as expected

Abierto
#2,166 2 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
11.9k
Forks
2.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.