question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Prevent the text input to be cleared when the onSend() function fails/rejects

See original GitHub issue

Feature 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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jeffnian88commented, Mar 7, 2018

+1 Is it possible that textInput keep text when onSend return false?

1reaction
gianpajcommented, May 30, 2018

@ewal awesome thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found