Carbon : Select component selected value is string though we have integer in option values.
See original GitHub issueScope: <DESCRIBE SCOPE OF THIS ISSUE, i.e.: PF4 mapper, Form renderer>
Description
In schema, we have number as value in options, once, we selected options, it is giving out selected value as string.
Expectation
If we give integer as value in options, selected item should be type integer.
Schema
{
"component": "select",
"label": "Select",
"name": "select",
"initialValue":2,
"options": [
{
"label": "Dogs",
"value": 1
},
{
"label": "Cats",
"value": 2
},
{
"label": "Hamsters",
"value": 3
}
]
}
];
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
How to get selected value of a dropdown menu in ReactJS
Hi, if you need to specify a default value you can use defaultValue="10" and this will select your option. I hope it helps....
Read more >Select – Carbon Design System
The select component allows users to choose one option from a list. It is used in forms for users to submit data.
Read more >Select: value is always of type string · Issue #11155
Seems like I went looking into "option" with anticipation to find some input source data. Select also accepts only string as value and ......
Read more >24 Working with dates and times
Stata stores dates, times, and dates and times as integers such as −4,102, 0, 82, 4,227, and. 1,479,735,745,213. It works like this: 1....
Read more >JSON functions | BigQuery
Returns a SQL NULL if a non-scalar value is selected. STRING. JSON_QUERY_ARRAY, Extracts an array of JSON values, such as arrays or objects,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kavyanekkalapu I found what the issue and made a PR to fix. We will also backport this fix to v2.
@kavyanekkalapu thanks for reporting this! Actually the issue is in the number 0, if you change 0 to some other value, it works well. It will be probably some edge-case bug, I will investigate tomorrow.