Don´t show "0" if there are NO DB notifications #11406
-
PackageNotifications Package Versionv3.2 How can we help you?I added DB notifications to my panel - and this work fine. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
create this view <x-filament::icon-button
:badge="$unreadNotificationsCount ? $unreadNotificationsCount : null"
color="gray"
icon="heroicon-o-bell"
icon-alias="panels::topbar.open-database-notifications-button"
icon-size="lg"
:label="__('filament-panels::layout.actions.open_database_notifications.label')"
/> |
Beta Was this translation helpful? Give feedback.
-
Another approach via CSS without touching vendor files:
The notification modal has a content container ( The downside of this approach is that we are relying on fragile CSS selectors, I guess. If Filament receives updates changing the DOM a little bit, this solution might stop working. |
Beta Was this translation helpful? Give feedback.
create this view
resources/views/vendor/filament-panels/components/topbar/database-notifications-trigger.blade.php