const schema = z.object({
currency: z.string(),
});
type schema = z.infer<typeof schema>;
const form = useAppForm({
validators: {
onSubmit: schema,
},
defaultValues: {
currency: ''
} as schema,
onSubmit: async ({ value }) => {
},
});
return (
<form.AppField
name={'currency'}
children={(field) => (
<field.Field>
// handleChange doesnt accept null
<Select onValueChange={field.handleChange}>
</Select>
</field.Field>
)}
/>
)
const schema = z.object({
currency: z.string(),
});
type schema = z.infer<typeof schema>;
const form = useAppForm({
validators: {
onSubmit: schema,
},
defaultValues: {
currency: ''
} as schema,
onSubmit: async ({ value }) => {
},
});
return (
<form.AppField
name={'currency'}
children={(field) => (
<field.Field>
// handleChange doesnt accept null
<Select onValueChange={field.handleChange}>
</Select>
</field.Field>
)}
/>
)