akiran / akiran/react-slick

ondemand lazy loading sometimes fails to load some images

Abierto
#1,323 4 comentarios 0 reacciones 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

If you are using `ondemand` lazy loading and the number of slides doesn't divide evenly into your `slidesToShow`/`slidesToScroll`, then skipping directly to the last page will make it so some of the images end up not rendering.

In [this example](https://codesandbox.io/s/z2yzy90xzx), I'm using 7 images, showing 3 images at a time and sliding 3 images at a time. That means that page 3 should have the 5th, 6th, and 7th image. If you scroll one page at a time, that's what you'll get. However, if you skip directly to the last page, you'll see two blank spots before the 7th image, like in this picture:

![missing two images](https://user-images.githubusercontent.com/83964/43361543-0b459d6e-9286-11e8-981a-0aa7dd81974a.png)

### Note
FWIW, the template for submitting an issue suggests [a sandbox with broken CSS](https://codesandbox.io/s/ppwkk5l6xx) - it looks like you can't add separate `head` and `body` tags, but you can still add the css via HTML, like in [this sandbox](https://codesandbox.io/s/y0w9kqyq11), or you can add it in `index.css` using `@import`.

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.