0

I want to keep showing keyboard. For example, when I press submit, the process takes place and the keyboard remains open.

<TextInput
        style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}
        onChangeText={(text) => SetText(text)}
        onSubmitEditing={() => press(text)}
      />

Like sending messages in whatsapp. It's kind of the opposite of keyboard.dismiss().

Marek Lisik
  • 2,003
  • 1
  • 8
  • 17
Alperen ARICI
  • 204
  • 6
  • 13

1 Answers1

1

TextInput component from react-native has a property specifically for that - blurOnSubmit:

<TextInput blurOnSubmit={false} {...yourOtherProps} />

You can find the documentation here: https://github.com/facebook/react-native-website/blob/master/docs/textinput.md#bluronsubmit

Marek Lisik
  • 2,003
  • 1
  • 8
  • 17