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

How to remove specific global toast? #185

Open
phuc2401 opened this issue Oct 8, 2020 · 3 comments
Open

How to remove specific global toast? #185

phuc2401 opened this issue Oct 8, 2020 · 3 comments

Comments

@phuc2401
Copy link

phuc2401 commented Oct 8, 2020

Hello everyone, I checked and see that we only support clear() to clear all toast.
Do we have some option to clear specific toast?
The case is I registered 2 global toast, one of them will show when we have no internet connection. So when the connection is back, I want to clear that toast, but can't find a suitable option.

@shakee93
Copy link
Owner

shakee93 commented Oct 8, 2020

let offlineToast = this.$toasted.global.my_app_error({
    message : 'You are offline!'
});

offlineToast.goAway();

this doesn't work for you ?

@phuc2401
Copy link
Author

Hi @shakee93, thank you for the response, the case is I registered global Toast like this example, and we can use this.$toasted.global.my_app_error(); to show that toast. But how can I close this global toast?
image

@shakee93
Copy link
Owner

let offlineToast = this.$toasted.global.my_app_error({
    message : 'You are offline!'
});

offlineToast.goAway();

this doesn't work for you ?

you have to update it like this example. and call goAway to remove the global toast

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

No branches or pull requests

2 participants