ios - <TextInput keyboardType ="numeric"/> 在 native react 中不起作用

标签 ios reactjs 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 ,)

最佳答案

<TextInput value={this.state.mobileNumber}
     returnKeyType={'next'}
     keyboardType={'phone-pad'}
     onChangeText={(mobileNumber) => this.setState({mobileNumber})}
                                       style={[styles.input]}                                      
  />

关于ios - <TextInput keyboardType ="numeric"/> 在 native react 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32043603/

相关文章:

swift - 使用 React Native 获取 iOS 电池数据

reactjs - 无法覆盖react-native的TextInput默认填充

ios - AudioServicesCreateSystemSoundID 不播放 mp3 文件

reactjs - React 数组作为 prop 传递给 SFC 时转换为对象

javascript - 如何在 Jest/Enzyme 上测试子组件

reactjs - 我是否将图像资源存储在公共(public)或reactJS中的src中?

react-native - 引用错误 : Can't find variable React - React Navigation

ios - 如何自定义 UITableView 的某些单元格高度,而将其他单元格保留为默认值?

ios - 无需在 Watch 上创建应用程序即可在 Apple Watch Series 3 中读取心率

iphone - 旋转到特定角度不起作用