akiran / akiran/react-slick

determine slides "in view" when scrolling partial pages

Offen
#1,684 0 Kommentare 0 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

https://codesandbox.io/s/react-slick-playground-ok514
^^ nothing special, just a basic carousel with 10 slides..

we are having an issue where we need to know exactly what ones are still "in-view" ...
when we show full pages, it is easy to determine this with the beforeChange and or afterChange ... but when you end up scrolling a partial page, (in my example 2 existing, 2 new) the slick-current is data-id 8 and the slick-active is data-id 8-9, but data 6,7,8,9 are "in-view" ... the carousel only transformed so many pixels due to the slidesToOffset.

Is there any way we can add a class (slick-in-view?) or get more data in beforeChange to easily know what items are "in-view" after all transform/animation is complete?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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