[ReactNative] Adding clear function to the react native TextInput component.
This commit is contained in:
parent
81dd9c27ea
commit
000ab1139f
|
@ -346,6 +346,10 @@ var TextInput = React.createClass({
|
||||||
isInAParentText: React.PropTypes.bool
|
isInAParentText: React.PropTypes.bool
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clear: function() {
|
||||||
|
this.setNativeProps({text: ''});
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
if (Platform.OS === 'ios') {
|
if (Platform.OS === 'ios') {
|
||||||
return this._renderIOS();
|
return this._renderIOS();
|
||||||
|
|
Loading…
Reference in New Issue