vue-toasted
vue-toasted copied to clipboard
How to remove specific global toast?
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.
let offlineToast = this.$toasted.global.my_app_error({
message : 'You are offline!'
});
offlineToast.goAway();
this doesn't work for you ?
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?
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