fix(carousel demo): default loop=true so triggers never go dead at boundaries

The "los clicks siguen fallando" report was tested against loop=false
default behavior — at idx=3 (last slide) the next button correctly went
disabled (canGoNext=false), opacity 0.4, no advance — but testers read
that as a broken click handler rather than a boundary stop.

Default the demo to loop=true so each click predictably advances
(0→1→2→3→0...). Verified 6 successive clicks wrap correctly. Component
default stays loop=false (matches Embla / Mantine / ark-ui); the demo
just picks the more illustrative interactive baseline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
active-uix
dev 5 months ago
parent f197463968
commit 09bbf05ec0

@ -25,7 +25,11 @@
let align = $state<CarouselAlign>('start');
let gap = $state(0); // in rem; converted to `${gap}rem` when forwarded
let verticalBlockSize = $state(16); // rem
let loop = $state(false);
// Default `loop=true` for the demo so clicking next/prev wraps around
// instead of going dead at the boundaries — the disabled state at
// canGoNext=false / canGoPrev=false confused testers into thinking
// the click handler had broken. Component default stays `loop=false`.
let loop = $state(true);
// Drag
let dragEnabled = $state(true);

Loading…
Cancel
Save

Powered by TurnKey Linux.