-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Hey,
I am voting for defaultValue and value to allow primitive types
<Select name="countryCode" defaultValue="ZA"
my reasoning
- It doesnt follow native select convention to pass an object as the value. Its not intuitive.
- Developers dont store the select value in a database as an object, the value will be stored as a primitive.
- If a developer wants to set the defaultValue from a stored value then they would need to filter the array of options to find the object and give that to the select - seems tedious for every developer who uses this to do that when you could do it once.
- If developers want the chosen object they should use an event like 'onChange' to get it.
Its a great plugin, here it is in the wild:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
