akiran / akiran/react-slick

variableWidth on mobile device break the slider

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

説明

Hey guys ! Thanks for this amazing plugin, it really rocks !

There seems to be a problem in the way the width of the `slick-track` div is calculated on mobile. This causes the slider to completly break on the first change of slide because the translation is also wrongly calculated.

My settings :
```javascript
{
infinite: true,
centerMode: true,
slidesToShow: 1,
slidesToScroll: 1,
variableWidth: true,
draggable: false,
speed: 1000
}
```

This issue can be replicated when you switch to mobile view on https://codesandbox.io/s/react-slick-playground-1huh6.

The funny thing here is that if you just change the setting `slidesToShow` to `0`, a javascript error is displayed but the width is rightly calculated!

Anyway, let me know if you find anything!

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

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

評価

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

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

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