首页 > 代码库 > React Native TextInput 提交时/return时 如何隐藏输入光标

React Native TextInput 提交时/return时 如何隐藏输入光标

...

render(){

  <View>

    <TextInput

      value=http://www.mamicode.com/‘text input‘

      onSubmitEditing={Keyboard.dismiss}

 

    />

  </View>

}

...

如上:只要在onsubmitEditing中调用Keyboard.dismiss就好了

React Native TextInput 提交时/return时 如何隐藏输入光标