akiran / akiran/react-slick

Wrong recalculation on page load, of dynamic width of items to show/hide arrows if overflow is true

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

説明

This issue is not consistent, but on page load we have an issue when trying to calculate how many `slidesToShow` we have, usually it renders arrows only when we resize the window, and not on page load where we also trigger the calculcation.

In one example of slick it's set slidesToShow to 1 and it’s working but it’s not working for us - if it’s 1 only 1 slide (item) is showing https://react-slick.neostack.com/docs/example/variable-width/
could be because the other properties differ:
`dots: false
infinite: false
centerMode: false
slidesToShow: 1,
slidesToScroll: 1,
variableWidth: true`

Also basically we can’t set a fixed width style attribute because the text is of variable length but even if we do the calculation and set the width it’s only showing 1 slide.

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

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

評価

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

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

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