react-awesome-slider icon indicating copy to clipboard operation
react-awesome-slider copied to clipboard

Autoplay does not work and how to turn off Bar

Open hutber opened this issue 4 years ago • 2 comments

Hey there, thank you first for writing this package! v.4.1.0

It seems that autoplay and the bar are getting stuck, I would also like to the turn countdown bar off too: image

Code:

              <AutoplaySlider
                bullets={false}
                organicArrows={false}
                play={true}
                cancelOnInteraction={false} // should stop playing on user interaction
                interval={6000}
              >
                {images.map(img => (
                  <div data-src={img} key={img} />
                ))}
              </AutoplaySlider>

output html

image

I hope this helps.

hutber avatar Jan 13 '21 00:01 hutber

Please try:

const AutoplaySlider = withAutoplay(AwesomeSlider);

must be inside the render() method, I put it inside render() is working.

tong-anupan avatar Jan 14 '21 17:01 tong-anupan

I seem to be having the same issue, and it seems to mostly stem from having more than one autoplay slider on a page. Further, it seems to not exhibit the issue for me when I'm developing and only rears its head after being built and deployed. Take this all with a grain of salt, but I haven't figured out a way to solve this yet, and I did try putting the AutoPlaySlider in the render method.

christarpher avatar Jan 30 '21 03:01 christarpher