Duplicate loop attributes
shleycarter opened this issue · 4 comments
Hey, this carousel is really helpful, thanks. It seems that there are 2 descriptions of the loop attribute in the docs. The one that seems to work is the one that controls the autoplay loop. Currently I'm having trouble stopping the carousel from looping with autoplay set to false.
You are right - loop
was added by a contributor and is simply passed to the underlying Siema instance. I will remove it when I am able.
autoplay={false}
(or simply omitting the attribute) should stop the carousel from autoplaying/looping. If it doesn't, this is something I need to look at.
Hey Antony, it does in fact stop the autoplay loop, however it does not prevent the carousel from displaying it's items in a loop; ie. when you navigate to the end of the carousel, you can keep navigating to the beginning. Perhaps that's not what you had in mind with the loop attribute.
My use case is that I do not want my user to think there are more items than there actually are.
Thanks for getting back to me.
Hi @shleycarter. Did you try loop={false}
?
loop=true
it will repeat your items infinitely. is like there is no beginning and no end.
loop=false
will show only the items you have.
Just read through this and there is no issue here. Loop and Autoplay do two different things:
- Loop means when you reach the last slide (manually or otherwise, the next swipe will return the first slide again, as @johnyvelho has said
- Autoplay means that the carousel will play itself, i.e. no manual interaction required.
They are not mutually exclusive. Siema (the underlying carousel) doesn't support autoplay, it's specific to this library.