aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/scaling_amount_input.tsx
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-21 02:19:59 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-21 02:19:59 +0800
commit83f4fa92a5619afc129dd1098877f4c889dc27c4 (patch)
treeb1b4b0d22a447541e23d2940eff1da53f432317a /packages/instant/src/components/scaling_amount_input.tsx
parent953f8c119b561eeb3463194494e6725869a68bec (diff)
downloaddexon-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.tsx3
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}
/>
);
}