It's very common to want the first result to be virtually pressed when the input textbox is submitted. This adds a new boolean option onSubmitEditingSelectFirst to support this feature (default false).
If a user specifies textInputProps.onSubmitEditing and onSubmitEditingSelectFirst is set to true, then the first result is first pressed and then textInputProps.onSubmitEditing is executed. Note that onPress is evaluated asynchronously, so textInputProps.onSubmitEditing should not assume that the result of onPress is finished when textInputProps.onSubmitEditing is called.
It's very common to want the first result to be virtually pressed when the input textbox is submitted. This adds a new boolean option
onSubmitEditingSelectFirst
to support this feature (defaultfalse
).If a user specifies
textInputProps.onSubmitEditing
andonSubmitEditingSelectFirst
is set totrue
, then the first result is first pressed and thentextInputProps.onSubmitEditing
is executed. Note thatonPress
is evaluated asynchronously, sotextInputProps.onSubmitEditing
should not assume that the result ofonPress
is finished whentextInputProps.onSubmitEditing
is called.Example: