akiran / akiran/react-slick

ondemand lazy loading sometimes fails to load some images

オープン
#1,323 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
11.9k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

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`.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。