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

Cannot properly bind numbers to Select #2145

Open
marvin-j97 opened this issue Apr 25, 2024 · 1 comment
Open

Cannot properly bind numbers to Select #2145

marvin-j97 opened this issue Apr 25, 2024 · 1 comment

Comments

@marvin-j97
Copy link
Contributor

marvin-j97 commented Apr 25, 2024

Describe the bug

Creating a controlled Select does not seem to work with numbers. Using strings works fine.

Your Example Website or App

https://playground.solidjs.com/anonymous/fa9dd633-0354-4a80-94fa-d308fdfa8e2e

Steps to Reproduce the Bug or Issue

  1. The value starts at 7, but the Select displays nothing
  2. Select some value, the ev.currentTarget will be empty, so the value will be emitted as 0
  3. Change values to strings, and it will work as expected

Expected behavior

Either it works or numbers are not allowed as Select values. Type is:

JSX.OptionHTMLAttributes<HTMLOptionElement>.value?: string | number | string[] | undefined

Screenshots or Videos

No response

Platform

  • OS: Ubuntu
  • Browser: Chrome, Firefox

Additional context

No response

@ryansolid
Copy link
Member

Duplicate of #2144.

Already fixed .. will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants