react-currency-input
Advanced tools
Comparing version 1.1.1 to 1.2.1
@@ -83,2 +83,12 @@ 'use strict'; | ||
initialValue = props.allowEmpty ? null : ''; | ||
} else { | ||
if (typeof initialValue == 'string') { | ||
initialValue = Number.parseFloat(initialValue); | ||
} | ||
initialValue = Number(initialValue).toLocaleString(undefined, { | ||
style: 'decimal', | ||
minimumFractionDigits: props.precision, | ||
maximumFractionDigits: props.precision | ||
}); | ||
} | ||
@@ -85,0 +95,0 @@ |
{ | ||
"name": "react-currency-input", | ||
"version": "1.1.1", | ||
"version": "1.2.1", | ||
"description": "React component for inputing currency amounts", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
124770
228