From c59118dd4a06076818998a24e88a77b75ab47cbe Mon Sep 17 00:00:00 2001 From: Marc Doerflinger Date: Fri, 31 May 2024 12:52:37 +0000 Subject: [PATCH] Add autoFocus to staking and unstaking forms (#242) --- src/components/stake/stake_bundle_form.tsx | 1 + src/components/unstake/unstake_bundle_form.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/stake/stake_bundle_form.tsx b/src/components/stake/stake_bundle_form.tsx index 8ffcd9ce..9cc1e4e1 100644 --- a/src/components/stake/stake_bundle_form.tsx +++ b/src/components/stake/stake_bundle_form.tsx @@ -182,6 +182,7 @@ export default function StakeBundleForm(props: StakeBundleFormProps) { label={t('stakedAmount')} fullWidth disabled={props.formDisabled} + autoFocus variant={INPUT_VARIANT} {...field} onBlur={() => { field.onBlur(); calculateSupportedAmount(); }} diff --git a/src/components/unstake/unstake_bundle_form.tsx b/src/components/unstake/unstake_bundle_form.tsx index 4d9a61b6..79a45efd 100644 --- a/src/components/unstake/unstake_bundle_form.tsx +++ b/src/components/unstake/unstake_bundle_form.tsx @@ -128,6 +128,7 @@ export default function UnstakeBundleForm(props: UnstakeBundleFormProps) { label={t('stakedAmount')} fullWidth disabled={props.formDisabled || watchUnstakeMaxAmount } + autoFocus variant={INPUT_VARIANT} {...field} InputProps={{