From 476cae581f2264a098fae951ec5a3a5103227770 Mon Sep 17 00:00:00 2001 From: samy Date: Fri, 15 Aug 2025 17:55:09 -1000 Subject: [PATCH] add scroll to top option on notification toast --- .../views/components/notifications/event-toast.blade.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/views/components/notifications/event-toast.blade.php b/resources/views/components/notifications/event-toast.blade.php index 9ea54b8..fb32d4d 100644 --- a/resources/views/components/notifications/event-toast.blade.php +++ b/resources/views/components/notifications/event-toast.blade.php @@ -13,6 +13,10 @@ type: event.detail.type, }; + if (event.detail.scrollToTop) { + window.scrollTo({ top: 0, behavior: 'smooth' }); + } + const delay = event.detail.timeout ?? 4000; if (delay > 0) {