react-native-masked-text
Advanced tools
Comparing version
{ | ||
"name": "react-native-masked-text", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Text and TextInput with mask for React Native applications", | ||
@@ -26,9 +26,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"moment": "^2.16.0" | ||
"moment": "^2.18.1" | ||
}, | ||
"devDependencies": { | ||
"babel-preset-es2015": "^6.22.0", | ||
"babel-preset-react-native": "^1.9.1", | ||
"jest": "^18.1.0" | ||
"jest": "^19.0.2" | ||
} | ||
} |
@@ -111,3 +111,31 @@ # react-native-masked-text | ||
**TextInput Methods** <br /> | ||
If you want to use the methods of the native TextInput, use the `getElement()` method: | ||
```jsx | ||
export default class App extends React.Component { | ||
onGoFocus() { | ||
// when you call getElement method, the instance of native TextInput will returned. | ||
this.refs['myText'].getElement().focus(); | ||
} | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<View> | ||
<TextInputMask ref='myText' type={'only-numbers'} style={styles.input}/> | ||
</View> | ||
<View> | ||
<Button | ||
onPress={this.onGoFocus.bind(this)} | ||
title="Go Focus Hue" | ||
color="#841584" | ||
/> | ||
</View> | ||
</View> | ||
); | ||
} | ||
} | ||
``` | ||
**Options** <br /> | ||
@@ -261,2 +289,5 @@ Some types accept options, use it like this: `<TextInputMask type={'money'} options={{ unit: 'US$' }} />` | ||
# Changelog | ||
## 1.3.3 | ||
* Update dependencies (thanks to [Vlad-Zhukov](https://github.com/Vlad-Zhukov)) | ||
## 1.3.2 | ||
@@ -263,0 +294,0 @@ * Fix: ignoring Jet Brains ide files (thanks to [Vlad-Zhukov](https://github.com/Vlad-Zhukov)) |
56391
1.24%2
-33.33%325
10.54%Updated