fix: Select and shadcn FieldWrapper component#191
fix: Select and shadcn FieldWrapper component#191adityacodepublic wants to merge 6 commits intovantezzen:mainfrom
Conversation
|
@adityacodepublic is attempting to deploy a commit to the vantezzen Team on Vercel. A member of the Team first needs to authorize it. |
|
I think maybe using the key makes more sense? I feel like |
|
So should I update Ant and MUI to use |
|
Yes that would be good to have full consistency! |
|
|
But for enum Sports {
Football = "Football/Soccer",
Basketball = "Basketball",
Baseball = "Baseball",
Hockey = "Hockey (Ice)",
None = "I don't like sports",
}key will be available only with for |
|
Depending on the use case, the user may require either the there should be a way to provide label and id (key) in the options ? |
|
Oh I didn't know that about joi and yup! That's difficult, I think at the end zod expects the |
…alue of enum key)
tests: add shadcn v4, v3 tests (native Enum)
7862665 to
6b68e97
Compare
|
Zod, Yup, and Joi all expect enum values (ie: labels) as valid inputs for schema validation. Previously, Select tests passed because Select, enums weren’t used in basic.cy tests, So, I've fixed it and updated enum Sports { |
|
also fixes #190 |
|
Hi @vantezzen, any plans to move Autoform out of WIP ? Is there anything I can do to help ? |
|
Hi @vantezzen |
Fixes: #190 (dual error in array field), #180, #182, and other select-related issues.
One thing I’d like to confirm — should the
<SelectItem>valueremain askey(as before), or should we use thelabel?Ant and MUI use the label as the value, whereas Chakra, Mantine, and shadcn use the key.