How to force clear input after sending message ?
See original GitHub issueI’m facing a problem with android.
Each time i send a message the input seems to be cleared but when i start typing again the previous value is merged to the new value.
Ex : if i want to send 2 messages “Hello” and “World”
first i send “Hello” then when i start to write “World” my input display “HelloW” so the value of the last send is merged to the new value.
This happend only on android. i’ve tried to manually manage by affecting the value of onInputTextChanged
to text
props and then clear it at each send but it doesn’t fix it.
Any suggestion ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:14
- Comments:19
Top Results From Across the Web
Clearing my form inputs after submission - Stack Overflow
I just want my text inputs and textarea to clear after I hit the submit button. Here's the code. AFAIK, your <form> is...
Read more >How To Clear Input Field on Focus - W3Schools
Learn how to clear an input field on focus. Click on the input field to clear it: Clear Input Field on Focus. Example....
Read more >Clear Input fields after Submit using JavaScript | bobbyhadz
Clear multiple input fields after submit # · Use the querySelectorAll() method to select the collection. · Use the forEach() method to iterate...
Read more ><input type="reset"> - HTML: HyperText Markup Language
Try entering some text into the text field, and then pressing the reset button. Adding a reset keyboard shortcut. To add a keyboard...
Read more >How to Clear Input Values of Dynamic Form in React
There's a lot to consider when working on a React application, especially when they involve forms. Even if you're able to create a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Found a workaround. I have two different Galaxy S7’s and one of them had autosuggest/correct on by default. That phone was the one having this issue. I forced autoCorrect off in Gifted Chat and this issue went away.
Just add this prop to your GitftedChat component:
A dirty workaround for this that I’m currently using is setting the autoCorrect prop to
false
and thentrue
againonSend
(only for Android devices).