akiran / akiran/react-slick

determine slides "in view" when scrolling partial pages

Aperta
#1,684 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

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?

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.