Trouble building a field array component that can work with multiple forms #11490
Unanswered
alanshortis
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to build a field array component in TypeScript that can work with more than one form. To do this, I am trying to use a generic to pass the form fields interface, but I can't quite get the types right (it is working, but has type issues).
If I import my interface (that describes my form's fields) and use it in place of
T
everything works as expected, but with the generic I get some errors. Here's what I have:And the implementation:
I am seeing these errors:
Any help or pointers would be really appreciated
Beta Was this translation helpful? Give feedback.
All reactions