From 267170fe1169939a1b5bb9d849b33e9de9e79cd2 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 31 Jan 2026 03:19:21 +0200 Subject: [PATCH] Dispatch notifications to all component aliases --- .../partials/notifications-refresh.blade.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/views/filament/partials/notifications-refresh.blade.php b/resources/views/filament/partials/notifications-refresh.blade.php index 62e70a9..b1059e1 100644 --- a/resources/views/filament/partials/notifications-refresh.blade.php +++ b/resources/views/filament/partials/notifications-refresh.blade.php @@ -15,12 +15,18 @@ } succeed(() => { - if (window.Livewire?.dispatchTo) { - window.Livewire.dispatchTo('notifications', 'notificationsSent'); - return; + const dispatchTo = window.Livewire?.dispatchTo; + if (dispatchTo) { + ['notifications', 'filament.notifications', 'filament-notifications'].forEach((name) => { + try { + dispatchTo(name, 'notificationsSent'); + } catch (error) { + // ignore missing component names + } + }); } - window.Livewire.dispatch('notificationsSent'); + window.Livewire?.dispatch?.('notificationsSent'); }); }); };