From b2c4ec3d633134a734c01a05c9447f56d4b16c72 Mon Sep 17 00:00:00 2001 From: mapkeji Date: Tue, 23 Jul 2019 11:20:24 +0300 Subject: [PATCH 1/4] Replace cWRP with cDU in base-text-component --- lib/base-text-component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/base-text-component.js b/lib/base-text-component.js index cd87314b..e4da6950 100644 --- a/lib/base-text-component.js +++ b/lib/base-text-component.js @@ -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) { From 89151623fbd77cc0792e865e31b9acf338a531c2 Mon Sep 17 00:00:00 2001 From: Rodinei Fagundes Date: Wed, 31 Jul 2019 18:12:38 -0300 Subject: [PATCH 2/4] use find instead of filter on resolver --- dist/lib/mask-resolver.js | 2 +- lib/mask-resolver.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/lib/mask-resolver.js b/dist/lib/mask-resolver.js index 1d10f727..9d25d454 100644 --- a/dist/lib/mask-resolver.js +++ b/dist/lib/mask-resolver.js @@ -1 +1 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i { + let maskKey = maskKeys.find(m => { var handler = Masks[m]; return handler && handler.getType && handler.getType() === type; - })[0]; + }); let handler = Masks[maskKey]; From 399409672b6c1d36c3f3661fbaa7271b9a85fab0 Mon Sep 17 00:00:00 2001 From: Ben-hur Santos Ott Date: Sat, 3 Aug 2019 11:57:01 -0300 Subject: [PATCH 3/4] fix #176: Deprecation Warning: componentWillReceiveProps --- CHANGELOG.md | 7 +++++++ dist/lib/base-text-component.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8f9b743..cad4bc08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## 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! + ## [1.12.4] - 2019-07-12 ### Fix diff --git a/dist/lib/base-text-component.js b/dist/lib/base-text-component.js index 6334ef5f..f605f2bb 100644 --- a/dist/lib/base-text-component.js +++ b/dist/lib/base-text-component.js @@ -1 +1 @@ -Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i Date: Sat, 3 Aug 2019 12:02:53 -0300 Subject: [PATCH 4/4] docs: update version --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cad4bc08..c74dbfdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ - [#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 diff --git a/package.json b/package.json index 33f1b690..574624ab 100644 --- a/package.json +++ b/package.json @@ -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": [ {