akiran / akiran/react-slick

determine slides "in view" when scrolling partial pages

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

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?

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.