Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prop onInputTextChanged on GiftedChat API and help fix #286 #303

Merged
merged 2 commits into from
Jan 29, 2017

Conversation

jayshah123
Copy link
Contributor

This introduces a new prop : onInputTextChanged on GiftedChat API,
which is a callback function that will give whatever text is present currently in Composer back to user.

  • Composer has onChange prop but it is kind of consumed by onType function in GiftedChat.js.
    This will also help fix Strange behavior with onChange in overridden Composer for typing indicator for that user #286, where you see GiftedChat.js personally uses onChange,
    and the behaviour such as height calculation would have to be performed by library user (which right now happens in onType in GiftedChat.js)

  • This prop gives users a simpler interface to track change in input text, with all other features intact.

Kindly guide with suggestions/comments wherever feels necessary.
Thank you.

@morelazers
Copy link

Can we get this one merged? @kfiroo

@kfiroo kfiroo merged commit d3387e2 into FaridSafi:master Jan 29, 2017
@ghost
Copy link

ghost commented Dec 14, 2018

How can we get the text onInputTextChanged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange behavior with onChange in overridden Composer for typing indicator for that user
3 participants