Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<TextInput keyboardType="numeric"/> is not working in react native

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 ,)

like image 896
vasavi Avatar asked Aug 17 '15 05:08

vasavi


People also ask

What is TextInput in React Native?

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.

How do you Unfocus TextInput React Native?

To unfocus a TextInput in React Native, we can use the Keyboard. dismiss method. to set the onSubmitEditing prop to Keyboard. dismiss .


1 Answers

its working for me keyboardType='numeric'

like image 127
Faik SARI Avatar answered Sep 28 '22 06:09

Faik SARI