I'm having a multiline text in my react native view. When user types , in keyboard view I need to show done (tick mark) button. Instead of that it shows next line icon. Is there any way to achieve this. If I use text input I can do that , but I need multiple lines to be added. This is my text input
<TextInput style = {styles.contactInput}
underlineColorAndroid="transparent"
multiline = {true}
placeholder="Type your feedback here"/>
TextInput has a blurOnSubmit prop; when set to true, the return key dismisses the keyboard. For Multiline TextInput, return key enters a new line and not dismiss the keyboard. So, clicking on some other part of the View should dismiss the keyboard.
onSubmitEditing is triggered when you click the text input submit button (keyboard button). onChangeText is triggered when you type any symbol in the text input. In your example, you will achieve what you need in both cases.
TextInput needs value that it is the value that is gonna be shown inside the TextInput. And to update that value you use onChangeText that is gonna call whatever function you specify every time the text into the TextInput change.
You can add blurOnSubmit={true} in order to show the submit button rather than the return key
<TextInput style = {styles.contactInput}
underlineColorAndroid="transparent"
multiline = {true}
blurOnSubmit={true}
placeholder="Type your feedback here"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With