Autohide of notification from kendo-vue-notification

1 Answer 198 Views
Notification
Pavel
Top achievements
Rank 1
Pavel asked on 14 Sep 2022, 09:04 AM

Hi,

I want to use new notification Vue Notification Component & Overview | Kendo UI for Vue Docs & Demos (telerik.com) from kendo-vue-notification package. How I can implement autohide feature? I need to show the result of a operation but user doesn't have to close notification.

Thanks

Pavel

 

 

 

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 14 Sep 2022, 02:05 PM

Hi, Pavel.

Here is a StackBlitz example demonstrating how the targeted functionality can be implemented. To achieve the demonstrated behavior we have the following onToggle method.

onToggle(flag) {
  this[flag] = !this[flag];
  setTimeout(() => {
    this[flag] = false;
  }, 3000);
}

Using the setTimeout method and the above logic, we can define the period after which the Notification will be closed.

Please let me know if you have additional questions related to the current thread.

Regards,
Petar
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/.

Tags
Notification
Asked by
Pavel
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or