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

Allow setting the visibility of the SendButton #76

Merged
merged 2 commits into from
Aug 28, 2021
Merged

Allow setting the visibility of the SendButton #76

merged 2 commits into from
Aug 28, 2021

Conversation

halildurmus
Copy link
Contributor

@halildurmus halildurmus commented Aug 25, 2021

What does it do?

It adds the ability to change the visibility of the SendButton by introducing a new enum property called sendButtonVisibilityMode to the Chat widget.

When sendButtonVisibilityMode parameter passed into the Chat widget, the Input widget will check if the parameter is set to SendButtonVisibilityMode.always. If it is, the SendButton always be visible regardless of the TextField state.

If it is set to SendButtonVisibilityMode.editing, the SendButton will be visible only if the TextField is not empty.

The sendButtonVisibilityMode parameter defaults to SendButtonVisibilityMode.editing to maintain the existing behavior.

Why is it needed?

It will increase the flexibility when displaying the SendButton.

How to test it?

I've added some widget tests to not break the existing behavior and make sure everything works properly.

Related issues/PRs

Related #62

@demchenkoalex
Copy link
Member

Thank you for the contribution! 👍

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.

None yet

2 participants