vue-izitoast icon indicating copy to clipboard operation
vue-izitoast copied to clipboard

How to close a single toast, as well as all of them?

Open backspacerhino opened this issue 6 years ago • 2 comments

As the title says, how can I close a specific toast or all of them if I need?

I've tried this.$toast.remove(); this.$toast.hide(); I've tried searching inside the izi-toast.js for the function but there doesn't seem to be one

backspacerhino avatar Oct 05 '18 09:10 backspacerhino

Using the main library as reference: http://izitoast.marcelodolza.com/#Methods

To destroy all you use: iziToast.destroy(); I tried: this.$toast.destroy(); worked

To hide an specific toast you must reference it with a class and use: var toast = document.querySelector('.iziToast'); // Selector of your toast iziToast.hide({}, toast); // Or make new settings iziToast.hide({    transitionOut: 'fadeOutUp' }, toast); could not make work

lucascnunes avatar Feb 01 '19 05:02 lucascnunes

Hi, @eiipaw I investigate on this and maybe if necessary I can implement a hideAll method.

arthurvasconcelos avatar Aug 30 '19 05:08 arthurvasconcelos