From 31eef08d2f4df0553184205ccfa4e03535f5da26 Mon Sep 17 00:00:00 2001 From: Ben-hur Santos Ott Date: Fri, 2 Jun 2017 20:53:34 -0300 Subject: [PATCH] feat(custom-mask): adding keyboardType --- README.md | 5 ++++- lib/text-input-mask.js | 6 +++++- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ed69d4e..efc01d0a 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,9 @@ var money = MaskService.toMask('money', '123', { # Changelog +## 1.5.2 +* Adding `keyboardType` to custom mask. (thanks to [Nurbek Abulgazin](https://github.com/nurbek-ab)) + ## 1.5.1 * Adding `tinymask` to fix some custom mask issues. @@ -357,7 +360,7 @@ var money = MaskService.toMask('money', '123', { * Adding new and powerfull `custom` engine mask \m/. ## 1.4.0 -* Adding `customTextInput` to allow other inputs instead native TextInput. (thank to [Hellon Canella](https://github.com/helloncanella)) +* Adding `customTextInput` to allow other inputs instead native TextInput. (thanks to [Hellon Canella](https://github.com/helloncanella)) ## 1.3.4 * Remove default value from mask to allow placeholder on text-input (thanks to [Cuong Hoang](https://github.com/cuonghv91)). diff --git a/lib/text-input-mask.js b/lib/text-input-mask.js index 2ee7e9d4..e1e08057 100644 --- a/lib/text-input-mask.js +++ b/lib/text-input-mask.js @@ -42,11 +42,15 @@ export default class TextInputMask extends BaseTextComponent { return true; } + _getKeyboardType() { + return this.props.keyboardType || this._maskHandler.getKeyboardType() + } + render() { return ( this._onChangeText(text)} value={this.state.value} diff --git a/package.json b/package.json index cc756a33..6c6c60bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-masked-text", - "version": "1.5.1", + "version": "1.5.2", "description": "Text and TextInput with mask for React Native applications", "main": "index.js", "scripts": {