Skip to content

Commit d8095bf

Browse files
committed
fix #209
1 parent 5cf8e15 commit d8095bf

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## 2.13.1 (April 15, 2020)
2+
* `enableAreaCodeStretch` to handle area codes of different length on the same country
3+
* null passed as value will clear country, empty string will clear prefix
4+
* `enableClickOutside` to disable dropdown close handler
5+
* `showDropdown` to allow initially opened dropdowns
6+
* Always return unformatted value as 1st argument and formatted as 4th in onChange
7+
* Search by dialCode
8+
* `searchNotFound` to modify text showed when no entry is found
9+
* Do not use prefix and dialCode in custom masks
10+
* Add `hiddenAreaCodes` which is the array of disabled area codes used to compute correct country
11+
* Enable event propagation for onEnterKeyPress
12+
* Validation `defaultErrorMessage` on the top of the input
13+
* Derive errorMessage from isValid handler
14+
* Mexican area codes [@fleetofthemalden](https://github.com/fleetofthemalden)
15+
* Australia area codes
16+
* Typescript support
17+
18+
119
## 2.12.1 (March 11, 2020)
220
* `priority`, `alwaysDefaultMask`
321
* Custom `tabIndex`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ If `enableAreaCodeStretch` is added, the part of the mask with the area code wil
388388
<td> false </td>
389389
</tr>
390390
<tr>
391-
<td> defaultInvalidMessage </td>
391+
<td> defaultErrorMessage </td>
392392
<td> string </td>
393393
</tr>
394394
</table>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-phone-input-2",
3-
"version": "2.13.0",
3+
"version": "2.13.1",
44
"description": "A react component to format phone numbers",
55
"main": "lib/lib.js",
66
"typings": "index.d.ts",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ class PhoneInput extends React.Component {
585585
formattedNumber
586586
}, () => {
587587
this.cursorToEnd();
588-
if (this.props.onChange) this.props.onChange(formattedNumber.replace(/[^0-9]+/g,''), this.getCountryData(), e, formattedValue);
588+
if (this.props.onChange) this.props.onChange(formattedNumber.replace(/[^0-9]+/g,''), this.getCountryData(), e, formattedNumber);
589589
});
590590
}
591591

0 commit comments

Comments
 (0)