akiran / akiran/react-slick

Slides going to multiple lines with variableWidth: true

Offen
#1,241 20 Kommentare 22 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
11.9k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Problem

When using `variableWidth: true` the track width is miscalculated when one (or more) of the slides are wider than the container. This results in the track contents overflowing to multiple lines (and the slider becoming very high).

Original slick tackles this by setting the slideWidth always to 5000px when variableWidth is used (cf. https://github.com/kenwheeler/slick/blob/a2aa3fec335c50aceb58f6ef6d22df8e5f3238e1/slick/slick.js#L2081)

### Example from examples

This is visible in this example, when you resize the window: https://react-slick.neostack.com/docs/example/variable-width

![screen shot 2018-05-23 at 14 59 38](https://user-images.githubusercontent.com/22023038/40423112-2d72ead8-5e9a-11e8-923d-42386cb92d58.png)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.