Don't set isValid on isDiabled (InputNumber) (#1152)
This commit is contained in:
parent
b8968ed1f7
commit
5f0c9543d6
@ -51,7 +51,7 @@ class InputNumber extends React.PureComponent<Props, State> {
|
||||
constructor (props: Props) {
|
||||
super(props);
|
||||
|
||||
const { defaultValue, isSi, value } = this.props;
|
||||
const { defaultValue, isDisabled, isSi, value } = this.props;
|
||||
let valueBN = new BN(value || 0);
|
||||
const si = formatBalance.findSi('-');
|
||||
|
||||
@ -60,7 +60,7 @@ class InputNumber extends React.PureComponent<Props, State> {
|
||||
? new BN(defaultValue || valueBN).div(new BN(10).pow(new BN(si.power))).toString()
|
||||
: (defaultValue || valueBN).toString(),
|
||||
isPreKeyDown: false,
|
||||
isValid: !isUndefined(value),
|
||||
isValid: isDisabled || !isUndefined(value),
|
||||
siOptions: formatBalance.getOptions().map(({ power, text, value }) => ({
|
||||
value,
|
||||
text: power === 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user