Fix small input-related bugs (#6258)

This commit is contained in:
Jaco 2021-10-08 12:15:53 +03:00 committed by GitHub
parent 5c151dae19
commit b4ea9af9ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ function reformat (value?: string | BN, isDisabled?: boolean, siDecimals?: numbe
: formatBalance.findSi('-');
return [
formatBalance(value, { decimals, forceUnit: si.value, withSi: false }).replace(',', isDisabled ? ',' : ''),
formatBalance(value, { decimals, forceUnit: si.value, withSi: false }).replace(/,/g, isDisabled ? ',' : ''),
si
];
}

View File

@ -97,7 +97,7 @@ class Params extends React.PureComponent<Props, State> {
defaultValue={values[index]}
index={index}
isDisabled={isDisabled}
key={`${name || ''}:${type.toString()}:${index}:${stringify(values[index])}`}
key={`${name || ''}:${type.toString()}:${index}:${isDisabled ? stringify(values[index]) : ''}`}
name={name}
onChange={this.onChangeParam}
onEnter={onEnter}