-
Notifications
You must be signed in to change notification settings - Fork 143
fix(rhf/fields): Properly infer types when using a resolver with a transform #637
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
Conversation
WalkthroughThis PR adds a new generic type parameter Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (10)
🧰 Additional context used🧬 Code graph analysis (10)src/components/form/field-checkbox/index.tsx (1)
src/components/form/form.tsx (5)
src/components/form/field-radio-group/index.tsx (1)
src/components/form/field-text/index.tsx (1)
src/components/form/field-number/index.tsx (1)
src/components/form/field-date/index.tsx (1)
src/components/form/form-field-controller.tsx (9)
src/components/form/field-checkbox-group/index.tsx (1)
src/components/form/field-select/index.tsx (1)
src/components/form/field-otp/index.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



When using React Hook Form with a zodResolver that has a transform clause (i.e output type != input type)
The types where not properly infered on the FormFieldController and Form component.
I know it's a bit annoying to have to pass the extra generic.
Dunno if it's worth the struggle :/
Summary by CodeRabbit