I want to build a chat app which is multiline TextInput and user can send the message when the enter is pressed. However it seems when the user press enter, the new line will be inserted anyway which give the user a bad experience.
I have tried How to prevent new line when enter is pressed in react-native but the new line still persists after the user hit Enter in the keyboard.
I also tried to trim the text when onChangeText is fired, but it seems the new line is still inserted. I know it works when blurOnSubmit=true, but I want to keep the keyboard open when user hits enter.