Showing Notification only to first visit to page?
1 Answer 16 Views
Jstemper
Top achievements
Rank 1
Iron
Jstemper asked on 13 Jul 2021, 10:07 PM

I would like to only display a notification the first time a user visits a page.  When the notification is closed I would like to set a Boolean value in local storage that I can check before displaying the notifications again. 

Is there a mechanism or event for the Notifications that would assist me in doing this?  I've read thru the examples and Docs but have not found anything.

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 16 Jul 2021, 06:41 AM

Hello John,

Indeed, the Notification component does not expose events at this point. If you require to set the boolean flag only after the user closes the popup, you can use a Window with an OnClick handler for its Close action. Alternatively, you can show the notification just once, make it bigger and more prominent (even position it at the center of the screen), and assume the user has seen it.

Regards,
Dimo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Asked by
Jstemper
Top achievements
Rank 1
Iron
Answers by
Dimo
Telerik team
Share this question
or