You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hover over fields in useFieldArray that doesn't have a control prop in FieldArray component.
The types are not inferred correctly.
Expected behaviour
If I pass a generic to useFieldArray, it infer fields type correctly, and it also works fine if I pass control. However, it doesn't infer types when we simply call useFieldArray within FormProvider without passing a generic. I just want to know if this is the expected behavior and how TypeScript operates. If yes, I would appreciate a brief note on this in the documentation.
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Version Number
7.51.0
Codesandbox/Expo snack
https://codesandbox.io/p/devbox/kk9zwc?migrateFrom=dlk4gv
Steps to reproduce
useFieldArray
that doesn't have a control prop inFieldArray
component.Expected behaviour
If I pass a generic to
useFieldArray
, it inferfields
type correctly, and it also works fine if I passcontrol
. However, it doesn't infer types when we simply calluseFieldArray
withinFormProvider
without passing a generic. I just want to know if this is the expected behavior and how TypeScript operates. If yes, I would appreciate a brief note on this in the documentation.What browsers are you seeing the problem on?
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: