Topic: Run method after toast closes
digitalmanagerguru free asked 4 years ago
Hi there,
is it possible to run a method after the toast closes?
I've a toast with a timer of 2000ms and after that he vanishes. In that moment I wanted to run a method. I could ofcourse create a setTimout right after I call the toast to run the method, but would be better if we could run a method after the toast ends. Maybe having a callback or something.
best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Opened
- ForumUser: Free
- Premium support: No
- Technology: MDB Vue
- MDB Version: 6.7.2
- Device: Desktop
- Browser: Chrome
- OS: Win.10
- Provided sample code: No
- Provided link: No
Mikołaj Smoleński staff commented 4 years ago
There is an
afterLeave
event which emits after the alert ends. Here's an example:<mdb-alert @afterLeave={()=> alert('afterLeave event')}>
Best regards
digitalmanagerguru free commented 4 years ago
Thanks for reply but, I'm using toasts aka notifications. Not alerts.https://mdbootstrap.com/docs/vue/advanced/notifications/
Mikołaj Smoleński staff commented 4 years ago
Unfortunately there are no events similar to alerts in notification. We're going to add such in the new MDB5 Vue wich is going to be released soon. Best regards