How to trigger FormRenderer onSubmit from outside form component? #1481
-
I ve a
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hello, I think your solution does make sense. We are working with a context and to reach the context, you have to be inside that. If you want to call some internal method, you have to do it from the inside. Preferably from the form template. However, to make it easier, we could provide some |
Beta Was this translation helpful? Give feedback.
@Amansaxena001 I have a small sandbox here: https://stackblitz.com/edit/vitejs-vite-k7m5tl?file=src%2FApp.tsx
with close button as a submit button. Let me know what you think.
Other option might very well be, enhancing the submit function and directly call the Drawer close callback.