szboynono / mosha-vue-toastify

A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.
https://szboynono.github.io/mosha-vue-toastify/
MIT License
222 stars 15 forks source link

Programmatically close the message #11

Closed kenso312 closed 3 years ago

kenso312 commented 3 years ago

I am working on a blockchain project, and I need a loading toast message when the user is waiting for the transaction writes into the chain. Then when the transaction is completed, the callback can trigger the close event and pop up a success toast message. Can you add a feature to support this scenario? Thanks!

szboynono commented 3 years ago

Hi, thanks for the feedback! I've added the programmatically closing features in v1.0.19 (https://github.com/szboynono/mosha-vue-toastify/releases/tag/v1.0.19). You can now use the close function that returns by the createToast function to close the toast, the library also exposes a clearToasts function in case you want to clear all the toasts on the page at once. Please take a look at the configuration section of the README for more details https://github.com/szboynono/mosha-vue-toastify#configuration

kenso312 commented 3 years ago

Thank you so much