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_input.tsx | |
parent | 953f8c119b561eeb3463194494e6725869a68bec (diff) | |
download | dexon-0x-contracts-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar dexon-0x-contracts-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.gz dexon-0x-contracts-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.bz2 dexon-0x-contracts-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.lz dexon-0x-contracts-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.xz dexon-0x-contracts-83f4fa92a5619afc129dd1098877f4c889dc27c4.tar.zst dexon-0x-contracts-83f4fa92a5619afc129dd1098877f4c889dc27c4.zip |
fix(instant): Autofocus text amount input
Diffstat (limited to 'packages/instant/src/components/scaling_input.tsx')
-rw-r--r-- | packages/instant/src/components/scaling_input.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/instant/src/components/scaling_input.tsx b/packages/instant/src/components/scaling_input.tsx index e1599a316..c379b76cd 100644 --- a/packages/instant/src/components/scaling_input.tsx +++ b/packages/instant/src/components/scaling_input.tsx @@ -28,6 +28,7 @@ export interface ScalingInputProps { maxLength?: number; scalingSettings: ScalingSettings; isDisabled: boolean; + autofocus: boolean; } export interface ScalingInputState { @@ -51,6 +52,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu maxLength: 7, scalingSettings: defaultScalingSettings, isDisabled: false, + autofocus: false, }; public state: ScalingInputState = { inputWidthPxAtPhaseChange: undefined, @@ -123,7 +125,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu } } public render(): React.ReactNode { - const { isDisabled, fontColor, onChange, placeholder, value, maxLength } = this.props; + const { autofocus, isDisabled, fontColor, onChange, placeholder, value, maxLength } = this.props; const phase = ScalingInput.getPhaseFromProps(this.props); return ( <Input @@ -136,6 +138,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu width={this._calculateWidth(phase)} maxLength={maxLength} disabled={isDisabled} + autoFocus={autofocus} /> ); } |