akiran / akiran/react-slick

react slick slider not working in first render for responsive design

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

説明

```
var settings = {
dots: false,
arrows: true,
infinite: false,
speed: 500,
slidesToShow: 4,
slidesToScroll: 4,
initialSlide: 0,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
initialSlide: 0,
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
initialSlide: 0,
}
},
{
breakpoint: 640,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
initialSlide: 1,
}
}
]
};

```
Would it be possible to have initialSlide be 1 if the screen is less than 640px wide when the Slider first mounts? slidesToShow will correctly be 1 instead of 3, could we override initialSlide the same way. I want to fix this for both web and mobile. For the first render in the web 4 slides are coming. but when the screen size is below 1024, there are no slides coming in the first render

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

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

評価

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

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

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