Identify Return Key action in React Native

后端 未结 3 1194
渐次进展
渐次进展 2021-02-06 20:59

I have a TextInput which I have enabled multiline as true. Thing is the Keyboard won\'t hide after Return is pressed. It goes to a new line. So I was h

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-06 21:21

    What I used is onSubmitEditing props. e.g.

     {
        this.searchChange(event.nativeEvent.text)
      }}
      returnKeyType='search'
      autoFocus={true}
      value={ this.props.searchName }
      selectionColor={colors.orangeColor}
      onSubmitEditing={this.searchSubmit}
      clearButtonMode="while-editing"
    />
    

提交回复
热议问题