solid icon indicating copy to clipboard operation
solid copied to clipboard

Cannot properly bind numbers to Select

Open marvin-j97 opened this issue 1 year ago • 1 comments

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

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

marvin-j97 avatar Apr 25 '24 20:04 marvin-j97

Duplicate of #2144.

Already fixed .. will be in the next release.

ryansolid avatar Apr 25 '24 21:04 ryansolid

@ryansolid was the fix released? I see the issue is still open and the Playground still shows the issue 👀

LexSwed avatar Jun 25 '24 08:06 LexSwed

Oh yeah I think you are right. I haven't done a Solid release recently. So this probably hasn't been released yet.

ryansolid avatar Jun 25 '24 15:06 ryansolid