Closed la-ruee-vers-le-bois closed 3 months ago
Hi @la-ruee-vers-le-bois, I tested the code you provided by I don't get the same behavior. Can you create a independent page (or a new app) and add only this component (the whole dialog) to see if the error persists?
HI and thx for your help :)
Add .toString()
solved the problem:
<SelectItem
key={cutSize.id.toString()}
value={cutSize.size.toString()}>
{cutSize.size} {cutSize.unity}
</SelectItem>
My cutSizes array:
[
{
id: 1,
created_at: '2023-07-03T06:22:12.666939+00:00',
size: 25,
unity: 'cm'
},
{
id: 2,
created_at: '2023-07-03T06:22:21.258911+00:00',
size: 33,
unity: 'cm'
},
{
id: 3,
created_at: '2023-07-03T06:22:50.065448+00:00',
size: 50,
unity: 'cm'
}
]
I had the same issue for a while. I just found a fix. The trick here is that the select values "are case sensitive". So value1 != VALUE1
. You need to make sure that the value in the map, field.value
and value
in the onValueChange
callback are equal ===
.
You can achieve this by converting them to string and unifying the case (if the list source doesn't). See screenshot:
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
Hi,
I had the following code:
And I get this "strange" comportement:
screen-capture (2).webm
Maybe I'm missing something ?
Thx for your help