akiran / akiran/react-slick

`infinite` doesn't play nicely with `variableWidth` and `focusOnSelect`

Abierto
#1,905 3 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

### Intention
I am trying to create an **infinite** slider that will display a set of items, where the items have **variable width** and a click item gets **focus on select** (moves to left edge of slider component) when clicked.

### Problem
In many (but not all cases), Slick React scrolls to cloned version of the clicked item, instead of the item itself.
[See example](https://codesandbox.io/s/react-slick-playground-forked-0t02t).

What's working:
* From index 0 (start), click on item -1 (left of item 0, visible because `overflow: visible`)
* From item -1, click on item 0
* From item -1, click on item 1
* From item -1, click on item 2

What's not working:
* From item 0, click on item 1 => scrolls to wrong item
* From item 1, click on item 2 => scrolls to wrong item
* From item -1, click on item -2 => scrolls to wrong item

(these lists are not exhaustive, obviously, just as an example)

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.