Skip to content

Commit

Permalink
Merge pull request #182 from benhurott/1.12.5-dev
Browse files Browse the repository at this point in the history
1.12.5 dev
  • Loading branch information
Ben-hur Santos Ott authored Aug 3, 2019
2 parents a9e1ef1 + d7cf2e1 commit 07952dd
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

## Unreleased

## [1.12.5] - 2019-08-03

### Fix

- [#176](https://github.com/benhurott/react-native-masked-text/issues/176) Deprecation Warning: componentWillReceiveProps
- Thanks to [Maksim Markelov](https://github.com/mmarkelov) for contributing!

### Chore

- Use find instead of filter on mask resolver.
- Thanks to [rodineijf](https://github.com/rodineijf) for contributing!

## [1.12.4] - 2019-07-12

### Fix
Expand Down
2 changes: 1 addition & 1 deletion dist/lib/base-text-component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lib/mask-resolver.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/base-text-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export default class BaseTextComponent extends PureComponent {
this._bindProps(this.props);
}

componentWillReceiveProps(nextProps) {
this._bindProps(nextProps);
componentDidUpdate() {
this._bindProps(this.props);
}

updateValue(text) {
Expand Down
4 changes: 2 additions & 2 deletions lib/mask-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ var maskKeys = Object.keys(Masks);

export default class MaskResolver {
static resolve(type) {
let maskKey = maskKeys.filter(m => {
let maskKey = maskKeys.find(m => {
var handler = Masks[m];
return handler && handler.getType && handler.getType() === type;
})[0];
});

let handler = Masks[maskKey];

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-masked-text",
"version": "1.12.4",
"version": "1.12.5",
"description": "Text and TextInput with mask for React Native applications",
"licenses": [
{
Expand Down

0 comments on commit 07952dd

Please sign in to comment.