在iOS上没有问题,但在Android上我有多行TextInput时,onSubmitEditing似乎无法正常工作。用户在输入中键入一些符号,当按下返回键时,我希望停止输入选项,保存已输入的符号,但是下面会出现新行,用户继续输入。
<TextInput
multiline
onSubmitEditing={text => this.saveCurrentValues()}
/>
答案 0 :(得分:0)
If the Textinput's Multiline is set to true, onSubmitEditing prop won't work. Since multiline requires Return key to jump to the next line. This info is explicitly stated in the React Native TextInput docs page.