@@ -5,6 +5,16 @@ An es6 react component for currency. Supports custom decimal and thousand separ
55[ ![ Build Status] ( https://travis-ci.org/jsillitoe/react-currency-input.svg?branch=master )] ( https://travis-ci.org/jsillitoe/react-currency-input )
66
77
8+ ## Changes
9+
10+ V1.3.0:
11+ -------
12+ * Depecrated "onChange" option in favor of "onChangeEvent". This fixes the argument order to better match React's default input handling
13+ * Updated dependencies to React 15
14+ * Added parseFloat polyfill
15+ * Persist events to deal with an issue of event pooling
16+ * Other bug fixes.
17+
818## Installation
919```
1020npm install react-currency-input --save
@@ -24,13 +34,13 @@ const MyApp = React.createClass({
2434 return ({amount: " 0.00" });
2535 },
2636
27- handleChange (newValue ){
28- this .setState ({amount: newValue });
37+ handleChange (event , maskedvalue , floatvalue ){
38+ this .setState ({amount: maskedvalue });
2939 },
3040 render () {
3141 return (
3242 < div>
33- < CurrencyInput value= {this .state .amount } onChange = {this .handleChange }/ >
43+ < CurrencyInput value= {this .state .amount } onChangeEvent = {this .handleChange }/ >
3444 < / div>
3545 );
3646 }
@@ -121,7 +131,8 @@ All other attributes are applied to the input element. For example, you can int
121131| Option | Default Value | Description |
122132| ------------- | ----------- | ----------- |
123133| value | 0 | The initial currency value |
124- | onChange | n/a | Callback function to handle value changes |
134+ | onChange | n/a | Callback function to handle value changes. Deprecated, use onChangeEvent. |
135+ | onChangeEvent | n/a | Callback function to handle value changes |
125136| precision | 2 | Number of digits after the decimal separator |
126137| decimalSeparator | '.' | The decimal separator |
127138| thousandSeparator | ',' | The thousand separator |
0 commit comments