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

Select multiple submits empty array as empty string #959

Closed
valterkraemer opened this issue Nov 21, 2024 · 2 comments
Closed

Select multiple submits empty array as empty string #959

valterkraemer opened this issue Nov 21, 2024 · 2 comments
Labels
bug Something isn't working next

Comments

@valterkraemer
Copy link

valterkraemer commented Nov 21, 2024

Describe the bug

<Select multiple name="fruits"

with nothing selected will result in a form data with

fruits

while a plain HTML select

<select multiple name="fruit"

will omit fruit from the form data.

When using SuperForms with bits-ui, this results in fruits to be concidered an array with an empty string [""] instead of an empty array [].

This happens on the next branch.

Reproduction

Cannot get StackBliz to work properly

Logs

No response

System Info

System:
  OS: macOS 15.1.1
  CPU: (8) arm64 Apple M2
  Memory: 109.78 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
  npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
  pnpm: 9.12.3 - ~/.nvm/versions/node/v22.11.0/bin/pnpm
  bun: 1.1.7 - ~/.bun/bin/bun
Browsers:
  Brave Browser: 130.1.71.123
  Chrome: 130.0.6723.117
  Safari: 18.1.1

Severity

annoyance

@huntabyte
Copy link
Owner

Thanks for reporting this! A fix is being released as we speak 😃

@valterkraemer
Copy link
Author

Thanks for reporting this! A fix is being released as we speak 😃

Great! Cheers! 🙏

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

No branches or pull requests

2 participants