mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 09:23:21 +01:00
Fix: UnitInput too narrow for small and trailing zeroed numbers (#20666)
* fix: UnitInput too narrow for small and trailing zeroed numbers * lint --------- Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
This commit is contained in:
parent
90a89f3f5b
commit
1e558af3b6
@ -38,7 +38,10 @@ export default class UnitInput extends PureComponent {
|
||||
const { value: propsValue } = this.props;
|
||||
const { value: stateValue } = this.state;
|
||||
|
||||
if (prevPropsValue !== propsValue && propsValue !== stateValue) {
|
||||
if (
|
||||
prevPropsValue !== propsValue &&
|
||||
Number(propsValue) !== Number(stateValue)
|
||||
) {
|
||||
this.setState({ value: propsValue });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user