autofocus -> hasAutoFocus
This commit is contained in:
@@ -62,7 +62,7 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput
|
||||
maxFontSizePx={this.props.startingFontSizePx}
|
||||
onAmountChange={this._handleChange}
|
||||
onFontSizeChange={this._handleFontSizeChange}
|
||||
autofocus={true}
|
||||
hasAutofocus={true}
|
||||
/>
|
||||
</Container>
|
||||
<Container
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface ScalingAmountInputProps {
|
||||
value?: BigNumber;
|
||||
onAmountChange: (value?: BigNumber) => void;
|
||||
onFontSizeChange: (fontSizePx: number) => void;
|
||||
autofocus: boolean;
|
||||
hasAutofocus: boolean;
|
||||
}
|
||||
interface ScalingAmountInputState {
|
||||
stringValue: string;
|
||||
@@ -30,7 +30,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps,
|
||||
onAmountChange: util.boundNoop,
|
||||
onFontSizeChange: util.boundNoop,
|
||||
isDisabled: false,
|
||||
autofocus: false,
|
||||
hasAutofocus: false,
|
||||
};
|
||||
public constructor(props: ScalingAmountInputProps) {
|
||||
super(props);
|
||||
@@ -66,7 +66,7 @@ export class ScalingAmountInput extends React.Component<ScalingAmountInputProps,
|
||||
placeholder="0.00"
|
||||
emptyInputWidthCh={3.5}
|
||||
isDisabled={this.props.isDisabled}
|
||||
autofocus={this.props.autofocus}
|
||||
hasAutofocus={this.props.hasAutofocus}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export interface ScalingInputProps {
|
||||
maxLength?: number;
|
||||
scalingSettings: ScalingSettings;
|
||||
isDisabled: boolean;
|
||||
autofocus: boolean;
|
||||
hasAutofocus: boolean;
|
||||
}
|
||||
|
||||
export interface ScalingInputState {
|
||||
@@ -52,7 +52,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu
|
||||
maxLength: 7,
|
||||
scalingSettings: defaultScalingSettings,
|
||||
isDisabled: false,
|
||||
autofocus: false,
|
||||
hasAutofocus: false,
|
||||
};
|
||||
public state: ScalingInputState = {
|
||||
inputWidthPxAtPhaseChange: undefined,
|
||||
@@ -125,7 +125,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu
|
||||
}
|
||||
}
|
||||
public render(): React.ReactNode {
|
||||
const { autofocus, isDisabled, fontColor, onChange, placeholder, value, maxLength } = this.props;
|
||||
const { hasAutofocus, isDisabled, fontColor, onChange, placeholder, value, maxLength } = this.props;
|
||||
const phase = ScalingInput.getPhaseFromProps(this.props);
|
||||
return (
|
||||
<Input
|
||||
@@ -138,7 +138,7 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu
|
||||
width={this._calculateWidth(phase)}
|
||||
maxLength={maxLength}
|
||||
disabled={isDisabled}
|
||||
autoFocus={autofocus}
|
||||
autoFocus={hasAutofocus}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user