Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wa-checkbox submitting on instead of assigned value when toggled #59

Open
bitbandit01 opened this issue Jul 23, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@bitbandit01
Copy link

bitbandit01 commented Jul 23, 2024

Describe the bug

Using the wa-checkbox component with a name value pair. The value is not maintained within the component when it is toggled. If the checkbox is toggled off and on again, the value submitted with the form will be "on" instead of the assigned value.

To Reproduce

Link to codepen

Results can be viewed in console.
Click the submit button on load and you will get expected behaviour
FormData { test → "myvalue" }

Then uncheck the box and you also get expected behaviour
FormData(0)

Then recheck the box and you get incorrect behaviour (should be "myValue")
FormData { test → "on" }

Browser / OS

  • OS: Fedora 40
  • Browser: Firefox
  • Browser version: 128.0

Tasks

No tasks being tracked yet.
@bitbandit01 bitbandit01 added the bug Something isn't working label Jul 23, 2024
@KonnorRogers
Copy link
Collaborator

Thanks! Let me take a look, I think I have this fixed in an SSR branch I'm working on , but I'll add a regression test for this.

@KonnorRogers
Copy link
Collaborator

Confirmed, will be fixed in the next release! (regression test added)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants