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

How to use multi select when value is numeric? #34

Open
gd-rvemula opened this issue Nov 8, 2024 · 1 comment
Open

How to use multi select when value is numeric? #34

gd-rvemula opened this issue Nov 8, 2024 · 1 comment

Comments

@gd-rvemula
Copy link

gd-rvemula commented Nov 8, 2024

here is my option array
options={[
{ value: 408, label: "408 Request Timeout" },
{ value: 403, label: "403 Forbidden" },
{ value: 429, label: "429 Too Many Requests" },
{ value: 500, label: "500 Internal Server Error" },
{ value: 502, label: "502 Bad Gateway" },
{ value: 503, label: "503 Service Unavailable" },
{ value: 504, label: "504 Gateway Timeout" }
]}

MultiSelect
id="StatusCodes"
value={formData.statusCodes}
value={formData.statusCodes}

I get the error: Type 'number[]' is not assignable to type 'string | number | readonly string[] | undefined'. Type 'number[]' is not assignable to type 'readonly string[]'. Type 'number' is not assignable to type 'string'.ts(2322)

@matheusteixeira7
Copy link

parse number to string with { value: String(408) }

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

No branches or pull requests

2 participants