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

Support zod nativeEnum field (or allow free text entry) #82

Open
paradoxloop opened this issue Jun 26, 2023 · 3 comments
Open

Support zod nativeEnum field (or allow free text entry) #82

paradoxloop opened this issue Jun 26, 2023 · 3 comments

Comments

@paradoxloop
Copy link

Hi great library!

Would be great if it supported the zod nativeEnum field alongside the currently supported the enum field. Alternativly as a work around it could put a plain text field to allow for manual data entry. The current implementation just hides the field and makes the mutation unsubmitable through trpc-panel.

Example:

enum Fruits {
  Apple,
  Banana,
}

....publicProcedure.input(z.object({id: z.string.uuid(), fruit: z.nativeEnum(Fruits)}).mutation(.......

will show the id field but hide the fruit field.

@dmatora
Copy link

dmatora commented Sep 1, 2023

same issue here

@Jonatthu
Copy link

Anyway to get this fixed? It’s causing a lot of trouble:(

@jimmyphan
Copy link

Would love this to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants