From 0544b8358af68df87dbc472221d8c0842c2b2db0 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 19 May 2023 13:26:47 -0300 Subject: accounts and notifications --- .../exchange-backoffice-ui/src/handlers/FormProvider.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx') diff --git a/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx b/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx index d8877333c..87c4c43fb 100644 --- a/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx +++ b/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx @@ -41,10 +41,12 @@ export function FormProvider({ children, initialValue, onUpdate, + onSubmit, computeFormState, }: { initialValue?: Partial; onUpdate?: (v: Partial) => void; + onSubmit: (v: T) => void; computeFormState?: (v: T) => FormState; children: ComponentChildren; }): VNode { @@ -58,7 +60,15 @@ export function FormProvider({ -
{children}
+
{ + e.preventDefault(); + //@ts-ignore + onSubmit(value.current); + }} + > + {children} +
); } -- cgit v1.2.3