Skip to content

Commit

Permalink
feat(custom-mask): adding keyboardType
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-hur Santos Ott committed Jun 2, 2017
1 parent e604d61 commit 31eef08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,17 @@ 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.

## 1.5.0
* 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)).
Expand Down
6 changes: 5 additions & 1 deletion lib/text-input-mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ export default class TextInputMask extends BaseTextComponent {
return true;
}

_getKeyboardType() {
return this.props.keyboardType || this._maskHandler.getKeyboardType()
}

render() {
return (
<Input
ref={INPUT_TEXT_REF}
keyboardType={this._maskHandler.getKeyboardType()}
keyboardType={this._getKeyboardType()}
{...this.props}
onChangeText={(text) => this._onChangeText(text)}
value={this.state.value}
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.5.1",
"version": "1.5.2",
"description": "Text and TextInput with mask for React Native applications",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 31eef08

Please sign in to comment.