Topic: Notification / Toast - tapToDismiss not working
tommykjensen
pro priority vip early access asked a year 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 a year 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 pro priority vip early access commented a year ago
Thank you, that did it. It now works.
Resolved
- User: Pro
- Premium support: No
- Technology: Angular
- MDB Version: 8.8.2
- Device: pc
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No