React-native: when sending text input to android, word sentence is not cleared


I have an Android application created using React native.
The application has a TextInput button and a submit button.
When entering text input, the keyboard starts to offer words by default (I'm not sure what this function is called - automatic or smart text).
When you click the "Send" button, the data is saved and TextInput is cleared using the "clear ()" TextInput method. For example:

this.refs.textInput.clear();

For some reason, “smart text” is not cleared after calling the clear () method. As a result, when the user starts typing again, the predictive text continues from where it was stopped, and the user must clear the text input.
Note: text input is multi-line. Not sure if this has anything to do with the problem. Here is an example for the same problem: Example

For more information, see Attached Image:

enter image description here

+3
source share
1 answer

:
, .

this.refs.textInput.setNativeProps({keyboardType:"email-address"});
this.refs.textInput.setNativeProps({keyboardType:"default"});
+5

Source: https://habr.com/ru/post/1016334/


All Articles