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

Toast without timeout and reason for onClose (user or timeout) #1737

Merged
merged 4 commits into from
Jun 1, 2018

Conversation

danieloprado
Copy link
Contributor

If duration is equal to 0 disable the toast timeout to close.
Added the reason that toast was closed: "user" when user press the button or "timeout" where duration ends.

@danieloprado
Copy link
Contributor Author

danieloprado commented Mar 27, 2018

Fix #1706 and the comment #1708 (comment)

@danieloprado
Copy link
Contributor Author

Any updates?

@BenWildeman
Copy link
Contributor

any updates on this?

@akhil-ga
Copy link
Contributor

@danieloprado onClose is called twice with reason user and timeout, when duration is specified.

toast

@@ -102,7 +104,7 @@ class ToastContainer extends Component {
{this.state.buttonText && (
<Button
style={this.state.buttonStyle}
onPress={() => this.closeToast()}
onPress={() => this.closeToast('user')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this line to cancel the this.closeTimeout when the user taps it

@BenWildeman
Copy link
Contributor

@akhil-geekyants that issue was there prior

@BenWildeman
Copy link
Contributor

@akhil-geekyants the whole Toast component needs rethinking really. there's a few issues surrounding this

@danieloprado
Copy link
Contributor Author

danieloprado commented Apr 19, 2018

Fixed! thanks for the feedback

@SupriyaKalghatgi SupriyaKalghatgi merged commit 02c77cb into GeekyAnts:master Jun 1, 2018
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.

4 participants