akiran / akiran/react-slick

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

Ouverte
#2,012 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
11.9k
Forks
2.1k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.