react-currency-input
Advanced tools
Comparing version 1.2.4 to 1.2.5
@@ -100,5 +100,6 @@ 'use strict'; | ||
// if the number is negative, insert a "-" to | ||
// the front of the array | ||
// the front of the array and negate the raw value | ||
if (allowNegative && numberIsNegative) { | ||
digits.unshift('-'); | ||
raw = -raw; | ||
} | ||
@@ -105,0 +106,0 @@ |
{ | ||
"name": "react-currency-input", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "React component for inputing currency amounts", | ||
@@ -34,3 +34,3 @@ "main": "lib/index.js", | ||
"homepage": "https://github.com/jsillitoe/react-currency-input#readme", | ||
"peerDependencies": { | ||
"dependencies": { | ||
"react": ">=0.14.0 || >=15.0.0" | ||
@@ -55,4 +55,3 @@ }, | ||
"sinon-chai": "^2.8.0" | ||
}, | ||
"dependencies": {} | ||
} | ||
} |
@@ -5,3 +5,5 @@ # react-currency-input | ||
[![Build Status](https://travis-ci.org/jsillitoe/react-currency-input.svg?branch=master)](https://travis-ci.org/jsillitoe/react-currency-input) | ||
## Installation | ||
@@ -127,4 +129,5 @@ ``` | ||
| thousandSeparator | ',' | The thousand separator | | ||
| inputType | "text" | Input field tag type. You may want to use `number` or `tel` | | ||
| inputType | "text" | Input field tag type. You may want to use `number` or `tel`* | | ||
| allowNegative | false | Allows negative numbers in the input | | ||
| allowEmpty | false | If no `value` is given, defines if it starts as null (`true`) or '' (`false`) | | ||
| prefix | '' | Currency prefix | | ||
@@ -134,4 +137,4 @@ | suffix | '' | Currency suffix | | ||
**Note:** Enabling any mask-related features such as prefix, suffix or separators | ||
__*Note:__ Enabling any mask-related features such as prefix, suffix or separators | ||
with an inputType="number" or "tel" could trigger errors. Most of those characters | ||
would be invalid in such input types. | ||
would be invalid in such input types. |
126035
7
243
138
+ Addedreact@>=0.14.0 || >=15.0.0