Topic: Run method after toast closes

digitalmanagerguru free asked 3 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

Mikołaj Smoleński staff commented 3 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 3 years ago

Thanks for reply but, I'm using toasts aka notifications. Not alerts.

Mikołaj Smoleński staff commented 3 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

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • 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