Skip to content

Commit

Permalink
dApp: Deposit form UX updates (#890)
Browse files Browse the repository at this point in the history
Closes: #891 

There was an issue with unexpected validation triggers on field focus.
To resolve it it was mandatory to disable on blur validation.
Also disabled form field auto focus so it won't unnecessarily cover the
UI.
  • Loading branch information
nkuba authored Nov 22, 2024
2 parents 94b72a6 + 96f2e13 commit 51788f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function TokenAmountFormBase({
withMaxButton={withMaxButton}
defaultAmount={defaultAmount}
autoFocus
autoComplete="off"
/>
{children}
</Form>
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/components/shared/TokenAmountForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const TokenAmountForm = withFormik<TokenAmountFormProps, TokenAmountFormValues>(
handleSubmit: (values, { props }) => {
props.onSubmitForm(values)
},
validateOnBlur: true,
validateOnBlur: false,
validateOnChange: false,
},
)(TokenAmountFormBase)
Expand Down

0 comments on commit 51788f6

Please sign in to comment.