[Feature request] Prevent the text input to be cleared when the onSend() function fails/rejects
See original GitHub issueFeature Request Description
The onSend(messages)
function doesn’t seem to have a callback.
So, for example, if the app cannot connect to the backend the input field text will be cleared no matter if the message was sent successfully or not.
For example, the device is offline, I would like to show an error and allow to retry once it’s connected again.
Expected changes
The onSend()
to have a callback to handle this.
Additional Information
- react-native-gifted-chat version: ^0.3.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Clear React Native TextInput - Stack Overflow
On my functional Component , I call another function along with submitHandler , that function will take care to clear text
Read more >Toggle Off to clear a text input field - Power Platform Community
Hello,. I'm looking for suggestion on how I can use the Toggle Off to make a text input field disable and clear any...
Read more >Clearing TextInput with React Native | by Joseph Emswiler
While developing a chat feature in a React Native app, I was attempting to create a TextInput component that would clear automatically after ......
Read more >How To Clear Input Field on Focus - W3Schools
When the input field gets focus, replace its current value with an empty string --> <input type="text" onfocus="this.value=''" value="Blabla">.
Read more >Event for clearing text inputs - App Building - Retool Forum
I know that clearing a text input counts as a 'change' event, ... As I was thinking through this feature request, and how...
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
+1 Is it possible that textInput keep text when onSend return false?
@ewal awesome thanks!