按键盘提交按钮时继续显示键盘

Keep showing keyboard when press keyboards submit button

我想继续显示键盘。例如,当我按下提交时,该过程发生并且键盘保持打开状态。

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

喜欢在 whatsapp 中发送消息。这有点与 keyboard.dismiss() 相反。

来自 react-native 的

TextInput 组件有一个 属性 专门用于 - blurOnSubmit:

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

您可以在此处找到文档:https://github.com/facebook/react-native-website/blob/master/docs/textinput.md#bluronsubmit