Skip to content

Fix x-carousel demo: use correct BareDOM event names#41

Closed
avanelsas wants to merge 1 commit intomainfrom
fix/carousel-demo-events
Closed

Fix x-carousel demo: use correct BareDOM event names#41
avanelsas wants to merge 1 commit intomainfrom
fix/carousel-demo-events

Conversation

@avanelsas
Copy link
Copy Markdown
Owner

Summary

The x-carousel demo control panel was non-functional because it listened for native DOM events (change, input, click) instead of BareDOM custom events.

Fixes

Control Was Now
x-switch controls change + e.target.checked x-switch-change + e.detail.checked
x-form-field inputs input + e.target.value x-form-field-input + e.detail.value
x-select dropdowns change + e.target.value select-change + e.detail.value
x-button actions click press

Note: Other demo pages have similar issues — this PR fixes only x-carousel. A broader demo audit can follow.

Test plan

  • Open x-carousel demo at localhost:8000
  • Toggle autoplay/loop/disabled switches — carousel responds
  • Change transition/direction selects — carousel updates
  • Adjust interval/slide/duration/peek inputs — carousel responds
  • Add/remove dynamic slides — buttons work

🤖 Generated with Claude Code

The demo used native event names (change, input, click) instead of
BareDOM custom events (x-switch-change, x-form-field-input,
select-change, press). Also read values from e.detail instead of
e.target.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avanelsas avanelsas closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant