How can I make info and success notifications disappear automatically after a few seconds, but have warning and error notifications to be closed manually by the user?
Best regards,
Kaan
3 Answers, 1 is accepted
0
Accepted
Ivan Danchev
Telerik team
answered on 10 May 2017, 06:05 AM
Hello Kaan,
The autoHideAfter configuration option is applied to all Notification types, thus we can suggest setting it to 0 (disabling auto-hide) and conditionally hide the Notification depending on its type in the show event handler. Here's a sample dojo, which demonstrates this approach. The info Notification is hidden after 2 seconds, whereas the warning Notification does not auto-hide.
Looking to implement the fix above, I've noticed a problem. If you show an info, while an warning is showing, it will hide both of them. Is there a way to target only the notification to be hidden?