|
|
|
@ -92,8 +92,12 @@ CurrencyDisplay.prototype.getConvertedValueToRender = function (nonFormattedValu |
|
|
|
|
: convertedValue |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function removeLeadingZeroes (str) { |
|
|
|
|
return str.replace(/^0*(?=\d)/, '') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CurrencyDisplay.prototype.handleChange = function (newVal) { |
|
|
|
|
this.setState({ valueToRender: newVal }) |
|
|
|
|
this.setState({ valueToRender: removeLeadingZeroes(newVal) }) |
|
|
|
|
this.props.onChange(this.getAmount(newVal)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|