1. 程式人生 > >react native關閉鍵盤

react native關閉鍵盤


 
<TextInput
          onSubmitEditing={Keyboard.dismiss}
           ref='input'
           style={styles.reply}
           placeholder={this.state.placeholder}
           numberOfLines={1}
           value = {this.state.replyaccount}
           underlineColorAndroid='transparent'
           onChangeText
={(text) => this.setState({ replyaccount: text})} />
關閉鍵盤:
this.refs['input'].blur();