-
Notifications
You must be signed in to change notification settings - Fork 251
Control.select doesn't put default selection into state until changed. #458
Comments
It might be a bug that <select>
<option value="" selected disabled>Choose here</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
</select> So I'll check on two things:
|
In react you can simply assign a value to the |
@ramiel Yes, setting |
Yes but looks like |
<Control.select model=".name" value="defaultName">...</Control.select> The above code, as-is, will never allow the value of |
So, should this work? <Control.select model=".name" defaultValue="defaultName">...</Control.select> |
Yes, |
Ok, thank you, I'll try |
If I set the defaultValue, the option is choosed but not set in the modelValue. Is an expected behavior? |
@ramiel Can you open a separate ticket for that? |
Of course |
@davidkpiano I am getting same issue as @ramiel |
I have the following
If I change this field, the value gets added to the state appropriately. However if I leave the field alone because the default value of Listing is correct, then the state will be missing the .type value. Is there a step I should take to make sure the value of select inputs gets added to the state by default? I have tried adding defaultValue but that doesn't have any effect.
The text was updated successfully, but these errors were encountered: