Replies: 4 comments 1 reply
-
|
Is the question similar to this question? |
Beta Was this translation helpful? Give feedback.
-
|
There is no good way of implementing this, you can either use |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I ended up using |
Beta Was this translation helpful? Give feedback.
-
|
A similar pattern is now possible with Mantine v9. See: #8198 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When the examples use
useFormContext()in a custom form input/component, it makes the component essentially tied to a specific form.The other option to write a reusable custom form component is to pass the
formas a prop.I though I could do away with defining a generic
Vthat specifies the current component's fields, but i get typescript errors:(the same code works when using
useFormContext())So, how to smartly build reusable form components with mantine form?
Sources:
Beta Was this translation helpful? Give feedback.
All reactions