Run method after toast closes

Topic: Run method after toast closes

digitalmanagerguru pro premium asked 11 months 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 11 months 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 pro premium commented 11 months ago

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

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


Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: 6.7.2
  • Device: Desktop
  • Browser: Chrome
  • OS: Win.10
  • Provided sample code: No
  • Provided link: No