I understand that this is an old post, but I immediately stumbled on Google and wanted to share my decision. Due to some things that should have happened in the case of submit, and not just blurring, I could not use onBlur to interpret submit.
I used the onKeyPress to track the Enter key, and then continued with the submission. ( Note , it is currently only supported on iOS until this PR is merged.)
// handler onKeyPress = ({ nativeEvent }) => { if (nativeEvent.key === 'Enter') { // submit code } }; // component <TextInput autoFocus={true} blurOnSubmit={true} enablesReturnKeyAutomatically={true} multiline={true} onChangeText={this.onChangeText} onKeyPress={this.onKeyPress} returnKeyType='done' value={this.props.name} />
Note. blurOnSubmit is still required to prevent the return key from being passed to your onChangeText handler.
Brad bumbalough
source share