From 3e95ae356a98d01e523bdf48547db4114ff224fe Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 22 May 2023 10:40:13 -0300 Subject: fix break on build --- .../src/handlers/InputArray.tsx | 22 +++++++++------ .../src/handlers/InputChoiceStacked.tsx | 14 ++++++---- .../src/handlers/InputDate.tsx | 12 ++++---- .../src/handlers/InputFile.tsx | 19 ++++++------- .../src/handlers/InputInteger.tsx | 10 +++++-- .../src/handlers/InputLine.tsx | 25 +++++++++-------- .../src/handlers/InputSelectMultiple.tsx | 12 ++++---- .../src/handlers/InputSelectOne.tsx | 14 ++++------ .../src/handlers/InputText.tsx | 4 ++- .../src/handlers/InputTextArea.tsx | 4 ++- .../exchange-backoffice-ui/src/handlers/forms.ts | 32 +++++++++++++--------- .../src/handlers/useField.ts | 29 +++++++++++++++++++- .../src/wallet/History.stories.tsx | 6 +--- .../src/wallet/Transaction.stories.tsx | 9 ++---- .../src/wallet/Transaction.tsx | 31 ++++++++++++--------- pnpm-lock.yaml | 4 --- 16 files changed, 145 insertions(+), 102 deletions(-) diff --git a/packages/exchange-backoffice-ui/src/handlers/InputArray.tsx b/packages/exchange-backoffice-ui/src/handlers/InputArray.tsx index c09806e58..00379bed6 100644 --- a/packages/exchange-backoffice-ui/src/handlers/InputArray.tsx +++ b/packages/exchange-backoffice-ui/src/handlers/InputArray.tsx @@ -71,17 +71,15 @@ function Option({ ); } -export function InputArray( +export function InputArray( props: { fields: UIFormField[]; labelField: string; - } & UIFormProps>, + } & UIFormProps, ): VNode { const { fields, labelField, name, label, required, tooltip } = props; - const { value, onChange, state } = useField<{ [s: string]: Array }>( - name, - ); - const list = value ?? []; + const { value, onChange, state } = useField(name); + const list = (value ?? []) as Array>; const [selectedIndex, setSelected] = useState(undefined); const selected = selectedIndex === undefined ? undefined : list[selectedIndex]; @@ -98,7 +96,7 @@ export function InputArray( {list.map((v, idx) => { return (