react-awesome-slider
react-awesome-slider copied to clipboard
Autoplay does not work and how to turn off Bar
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:
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
I hope this helps.
Please try:
const AutoplaySlider = withAutoplay(AwesomeSlider);
must be inside the render() method, I put it inside render() is working.
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.