akiran / akiran/react-slick

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

Aperta
#2,012 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
11.9k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.