diff options
author | Sebastian <sebasjm@gmail.com> | 2023-12-29 17:42:11 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-12-29 17:42:11 -0300 |
commit | a37abd2472ac2d521e81838632050963157f00af (patch) | |
tree | ef50fbaa71b3b7f8f911a608b17ecb858d291b75 /packages/web-util | |
parent | 4d4ef3f6d42ce743d3735d4b4088b38c4042805f (diff) | |
download | wallet-core-a37abd2472ac2d521e81838632050963157f00af.tar.xz |
fine tune dynamic forms
Diffstat (limited to 'packages/web-util')
-rw-r--r-- | packages/web-util/src/forms/DefaultForm.tsx | 3 | ||||
-rw-r--r-- | packages/web-util/src/forms/forms.ts | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/packages/web-util/src/forms/DefaultForm.tsx b/packages/web-util/src/forms/DefaultForm.tsx index 12babf39a..be8affbec 100644 --- a/packages/web-util/src/forms/DefaultForm.tsx +++ b/packages/web-util/src/forms/DefaultForm.tsx @@ -7,8 +7,9 @@ import { DoubleColumnForm, RenderAllFieldsByUiConfig } from "./forms.js"; export interface FlexibleForm<T extends object> { versionId: string; design: DoubleColumnForm; - behavior: (form: Partial<T>) => FormState<T>; + behavior?: (form: Partial<T>) => FormState<T>; } + export function DefaultForm<T extends object>({ initial, onUpdate, diff --git a/packages/web-util/src/forms/forms.ts b/packages/web-util/src/forms/forms.ts index 2c90a69ed..6e8a0e7c0 100644 --- a/packages/web-util/src/forms/forms.ts +++ b/packages/web-util/src/forms/forms.ts @@ -11,7 +11,7 @@ import { InputFile } from "./InputFile.js"; import { Caption } from "./Caption.js"; import { Group } from "./Group.js"; import { InputSelectOne } from "./InputSelectOne.js"; -import { FormProvider } from "./FormProvider.js"; +import { FormProvider, FormState } from "./FormProvider.js"; import { InputLine } from "./InputLine.js"; import { InputAmount } from "./InputAmount.js"; import { InputChoiceHorizontal } from "./InputChoiceHorizontal.js"; |