React Native: how to prevent adding new line on Enter button press on Android?

79 views Asked by At

could you help me understand how in React Native application to prevent adding new line on Android in native files? On iOS I made it to work by modifying function textInputShouldChangeText in file node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m.

I want to do the same on Android, already found few native files where I can add changes (inside node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textInput), but I can't get logs from that files in Android Studio, it feels like my changes inside these files are not applied in bundle.

Could you hint me what I'm doing wrong?

I'm expecting inside multiline TextInput to press Enter and to make textInput don't add new line, stay at the same line and receive event in onKeyPress prop.

0

There are 0 answers