brainhubeu / react-carousel

A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)
https://brainhub.eu/
MIT License
1.07k stars 164 forks source link

The animation for slider does not works when we put the props value #652

Open liokaraz opened 3 years ago

liokaraz commented 3 years ago

Hi, The animation for slider does not works when we put the props value

Thanks

5tausend commented 3 years ago

Maybe my solution can help. We use three consecutive carousels and the first element does not contain a transition either, so the animation of element one to two is not executed. My solution that helped us looks like this:

    let x = document.querySelectorAll('.BrainhubCarousel__track ')
    for (let i = 0; i < x.length; i++) {
      x[i].style.transition = '1s'
    }