Here is my instance
var LoginPopup=React.createClass({
render:function(){
return(
<View>
<TextInput placeholder="number" keyboardType="numeric"/>
<TextInput placeholder="url" keyboardType="url"/>
</View>
)
}
})
In this component any type of keyboardType is not working(like number,url, email-address,number-pad,phone-pad etc ,)
TextInput is a Core Component that allows the user to enter text. It has an onChangeText prop that takes a function to be called every time the text changed, and an onSubmitEditing prop that takes a function to be called when the text is submitted.
To unfocus a TextInput in React Native, we can use the Keyboard. dismiss method. to set the onSubmitEditing prop to Keyboard. dismiss .
its working for me keyboardType='numeric'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With