diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-21 02:19:59 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-21 02:19:59 +0800 |
commit | 83f4fa92a5619afc129dd1098877f4c889dc27c4 (patch) | |
tree | b1b4b0d22a447541e23d2940eff1da53f432317a /packages/instant/src/components/scaling_amount_input.tsx | |
parent | 953f8c119b561eeb3463194494e6725869a68bec (diff) | |
download | dexon-sol-tools-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar dexon-sol-tools-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.gz dexon-sol-tools-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.bz2 dexon-sol-tools-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.lz dexon-sol-tools-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.xz dexon-sol-tools-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.zst dexon-sol-tools-83f4fa92a5619afc129dd1098877f4c889dc27c4.zip |
fix(instant): Autofocus text amount input
Diffstat (limited to 'packages/instant/src/components/scaling_amount_input.tsx')
-rw-r--r-- | packages/instant/src/components/scaling_amount_input.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx index 5dc719293..3395cded1 100644 --- a/packages/instant/src/components/scaling_amount_input.tsx +++ b/packages/instant/src/components/scaling_amount_input.tsx @@ -18,6 +18,7 @@ export interface ScalingAmountInputProps { value?: BigNumber; onAmountChange: (value?: BigNumber) => void; onFontSizeChange: (fontSizePx: number) => void; + autofocus: boolean; } interface ScalingAmountInputState { stringValue: string; @@ -29,6 +30,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps, onAmountChange: util.boundNoop, onFontSizeChange: util.boundNoop, isDisabled: false, + autofocus: false, }; public constructor(props: ScalingAmountInputProps) { super(props); @@ -64,6 +66,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps, placeholder="0.00" emptyInputWidthCh={3.5} isDisabled={this.props.isDisabled} + autofocus={this.props.autofocus} /> ); } |