Notification / Toast - tapToDismiss not working


Topic: Notification / Toast - tapToDismiss not working

tommykjensen asked 5 years ago

I have added Notification to my project and want to display a toast that the user needs to click on to dismiss. I would assume that the option tapToDismiss is exactly for that purpose :-)

The toast do appear but disappers automatically after a few seconds.

This is how I initiate the toast from a service:

const options = { tapToDismiss: true,  toastClass: 'black', positionClass: 'md-toast-bottom-right' };
this.toast.error('Error message', msg, options);

Konrad Stępień staff answered 5 years ago

Hi @tommykjensen,

can you try use timeOut property for your option?

Like this:

const options = { tapToDismiss: true,  toastClass: 'black', positionClass: 'md-toast-bottom-right', timeOut: 0 };
this.toast.error('Error message', msg, options);

Best, Konrad


tommykjensen commented 5 years ago

Thank you, that did it. It now works.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.8.2
  • Device: pc
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No
Tags