From 6837a9dc6f677babe798bc94c0baa1f11c0edb55 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 26 Apr 2024 14:31:22 -0300 Subject: some comments --- packages/bank-ui/src/hooks/form.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/bank-ui/src/hooks/form.ts b/packages/bank-ui/src/hooks/form.ts index afa4912eb..fae11c05c 100644 --- a/packages/bank-ui/src/hooks/form.ts +++ b/packages/bank-ui/src/hooks/form.ts @@ -72,6 +72,7 @@ function constructFormHandler( updateForm: (d: FormValues) => void, errors: FormErrors | undefined, ): FormHandler { + const keys = Object.keys(form) as Array; const handler = keys.reduce((prev, fieldName) => { @@ -102,6 +103,14 @@ function constructFormHandler( return handler; } +/** + * FIXME: Consider sending this to web-utils + * + * + * @param defaultValue + * @param check + * @returns + */ export function useFormState( defaultValue: FormValues, check: (f: FormValues) => FormStatus, -- cgit v1.2.3