Skip to content
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

[Feature]: AutoForm: more flexibility #926

Open
1 of 2 tasks
razbakov opened this issue Nov 29, 2024 · 0 comments
Open
1 of 2 tasks

[Feature]: AutoForm: more flexibility #926

razbakov opened this issue Nov 29, 2024 · 0 comments
Labels
autoform Automatically generate a form from Zod schema

Comments

@razbakov
Copy link

razbakov commented Nov 29, 2024

Describe the feature

  • AutoFormFieldDate, AutoFormFieldEnum, etc. repeat FormField/FormItem/FormLabel structure in each file, but there is no need to do it. It's better to place it all in one "form field" wrapper (see example), which can have any component inside <FormControl>.
  • component in field-config is mapped to INPUT_COMPONENTS in AutoFormField and it limits component only to pre-defined values. It would be great to be able to use any component without changing INPUT_COMPONENTS.
  • AutoFormFieldEnum has a v-if="config?.component === 'radio'" to switch between <RadioGroup> and <Select>. But what if I want to use <ButtonGroup> or something else?

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.
@sadeghbarati sadeghbarati added the autoform Automatically generate a form from Zod schema label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autoform Automatically generate a form from Zod schema
Projects
None yet
Development

No branches or pull requests

2 participants