akiran / akiran/react-slick

afterChange doesn't fire with lazyLoading: 'ondemand'

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

説明

CodeSandBox: https://codesandbox.io/s/react-typescript-sq6ih

When i'm using **lazyLoading** option with **'ondemand'** value, _afterChange_ function doesn't fire. It's easy to reproduce by fast clicking on the "next arrow". But if all images already loaded bug will not reproduce (for example if u will press prev arrow).

Steps to reproduce:
1. After render page, just press on next arrow fast
2. You will see, that _beforeChange_ fires every time, but _afterChange_ sometimes doesn't fire
3. Watch on the console

Even if u already scrolled to last slide, _afterChange_ could still doesn't fire, looks like a bug..

![ezgif-1-0509b3f58284](https://user-images.githubusercontent.com/8730184/66007474-43dbb400-e4bb-11e9-9731-9d7e0b329451.gif)

p.s. sry for my eng.

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

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

評価

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

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

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