Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/120.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios <;TextInput键盘类型=";“数字”/&燃气轮机;在react native中不工作_Ios_Reactjs_React Native - Fatal编程技术网

Ios <;TextInput键盘类型=";“数字”/&燃气轮机;在react native中不工作

Ios <;TextInput键盘类型=";“数字”/&燃气轮机;在react native中不工作,ios,reactjs,react-native,Ios,Reactjs,React Native,这是我的例子 var LoginPopup=React.createClass({ render:function(){ 返回( ) } }) 在此组件中,任何类型的键盘类型都不起作用(如 号码、url、电子邮件地址、号码簿、电话簿等) keyboardType=“numeric”在Android和iOS上的react native 0.46.3上都适用于我。 您确定使用字母占位符(“数字”)不是问题的原因吗? 这是我的相关代码: <TextInput editable={!th

这是我的例子

var LoginPopup=React.createClass({
render:function(){
返回(
)
}
})
在此组件中,任何类型的键盘类型都不起作用(如 号码、url、电子邮件地址、号码簿、电话簿等)

keyboardType=“numeric”在Android和iOS上的react native 0.46.3上都适用于我。
您确定使用字母占位符(“数字”)不是问题的原因吗? 这是我的相关代码:

<TextInput
    editable={!this.state.user.logged}
    onChangeText={(mobileNumber) => this.setState({mobileNumber})}
    placeholder={I18n.t('MobileNumber')}
    ref='mobileNumber'
    returnKeyType={(Platform.OS === 'ios') ? 'done' : 'next'}
    placeholder={I18n.t('MobileNumber')}
    style={styles.inputText}
    underlineColorAndroid='rgba(0,0,0,0)'
    value={this.state.mobileNumber}
    keyboardType="numeric"
/>
this.setState({mobileNumber})}
占位符={I18n.t('MobileNumber')}
ref='mobileNumber'
returnKeyType={(Platform.OS=='ios')?'done':'next'}
占位符={I18n.t('MobileNumber')}
style={style.inputText}
下生色类='rgba(0,0,0,0)'
值={this.state.mobileNumber}
keyboardType=“数字”
/>
也许它会起作用:

keyboardType={"numeric"}
this.setState({mobileNumber})}
style={[style.input]}
/>
这对我有用
keyboardType='numeric'

你说不工作是什么意思?组件是否不可见?或者键盘不是数字的?我在安卓系统中也面临同样的问题@Chirag-我认为“vasavi”指的是一个问题,即-keyboardType=“numeric”打开的键盘也有字符。理想情况下,它应该打开一个只有数字的键盘。安卓系统中有这样的键盘。嗯,占位符为什么会以任何方式影响键盘?我只是假设字符串值可以改变文本输入的类型…当键盘类型是数字或手机挂件时,它不会在ios中显示“下一个”键。在ios上,你必须使用“完成”
returnKeyType:Platform.OS==“ios”?'完成:'下一步',
keyboardType={"numeric"}
<TextInput value={this.state.mobileNumber}
     returnKeyType={'next'}
     keyboardType={'phone-pad'}
     onChangeText={(mobileNumber) => this.setState({mobileNumber})}
                                       style={[styles.input]}                                      
  />