autoplay not working when adding beforeChange or afterChange
ferrarisMat opened this issue · 2 comments
ferrarisMat commented
Describe the bug
Having autoplay
and beforeChange={(e) => console.log(e)}
at the same time, disables the autoplay.
g787543 commented
Hi @ferrarisMat,
Have you set pauseOnHover={false}
?
if not autoplay will stop when you hover on carousel.
ferrarisMat commented
Hi @g787543,
Yep, it has been deactivated, I needed to trigger this function to get the current slide index before it scrolls to the next one, I found a way with the data-carousel-key
property and the .active
CSS class