Replies: 1 comment 1 reply
-
|
Could you count the slides and only create and mount the Splide object if there are more than 1? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are using Splide as a carousel and we are coming across what we think is an issue: We are only displaying one slide per page, we are using lazy-loaded images, and we want the carousel to loop when there are more than 1 slide. In those cases where there is only one slide, we do not want any slide behaviour at all.
While I can work around this (count the slides and pass a false value to
autoplay,pagination,drag, andarrowsif there are less than 2), I am wondering whether I am missing something... I'd assumed that this functionality would be the default, to be honest, as this seems to be an expected behaviour for end-users (at least in our experience), rather than a single duplicated slide.I did notice that using
type: 'slide'is a little closer to our expected results, but even then, the slide moves around a little, suggesting 'something more' to the user.Saying all of that, I still love Splide - it's a wonderful piece of work ❤️
Beta Was this translation helpful? Give feedback.
All reactions