-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add checkbox example to factorial form #1084
add checkbox example to factorial form #1084
Conversation
🔍 Visual review for your branch is published 🔍Here are the links to: |
@@ -12,6 +12,7 @@ import { z, ZodType } from "zod" | |||
|
|||
export const buildFormSchema = z.object | |||
export const stringField = z.string | |||
export const booleanField = z.boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fully sure of this approach for this. This obscures the use of the Zod library, I think I would prefer to know what I'm using. @josepjaume Any thoughts of getting rid of this in a future PR? I'm thinking of doing an example of nested schemas and I think this approach is not the best for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might be right and I was aware it could cause issues with nested schemas. Feel free to simplify the API and make the dependencies more explicit :)
ef6a23a
to
a4a792f
Compare
@@ -5,6 +5,7 @@ type CheckboxProps = Omit< | |||
"asChild" | |||
> & { | |||
title?: string | |||
onCheckedChange?: (checked: boolean) => void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about built in onChange
? doesn't it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Recently we added Checkbox field to form fields but we didn't add it to the form example.
Screenshots (if applicable)
Type of Change