From eb9593a847eab96b23a92bc6f573467a22617f9c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 16 Dec 2021 12:23:44 +0100 Subject: [PATCH] web/elements: close notification drawer when clearing all notifications Signed-off-by: Jens Langhammer --- web/src/elements/notifications/NotificationDrawer.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/elements/notifications/NotificationDrawer.ts b/web/src/elements/notifications/NotificationDrawer.ts index 175a5ae44..e619a5fbd 100644 --- a/web/src/elements/notifications/NotificationDrawer.ts +++ b/web/src/elements/notifications/NotificationDrawer.ts @@ -183,9 +183,15 @@ export class NotificationDrawer extends LitElement { composed: true, }), ); + this.dispatchEvent( + new CustomEvent(EVENT_NOTIFICATION_DRAWER_TOGGLE, { + bubbles: true, + composed: true, + }), + ); }); }} - class="pf-c-button pf-m-secondary pf-m-block" + class="pf-c-button pf-m-primary pf-m-block" type="button" aria-label=${t`Clear all`} >