Dispatch notifications to all component aliases
This commit is contained in:
@@ -15,12 +15,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
succeed(() => {
|
succeed(() => {
|
||||||
if (window.Livewire?.dispatchTo) {
|
const dispatchTo = window.Livewire?.dispatchTo;
|
||||||
window.Livewire.dispatchTo('notifications', 'notificationsSent');
|
if (dispatchTo) {
|
||||||
return;
|
['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');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user