solidjs / solid

A declarative, efficient, and flexible JavaScript library for building user interfaces.
https://solidjs.com
MIT License
31.64k stars 887 forks source link

Cannot properly bind numbers to Select #2145

Closed marvin-j97 closed 5 days ago

marvin-j97 commented 2 months ago

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

Additional context

No response

ryansolid commented 2 months ago

Duplicate of #2144.

Already fixed .. will be in the next release.

LexSwed commented 1 week ago

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

ryansolid commented 1 week ago

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