From 29bc5f01f151a7889912e24e889ecb2efe3c210a Mon Sep 17 00:00:00 2001 From: Tim Auf dem Kampe Date: Mon, 11 Nov 2024 10:43:48 +0100 Subject: [PATCH] fix(Notification): Also call onClose handler from notification component props if notification comes from an NotificationProvider --- .../components/NotificationProvider/ControlledNotification.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/src/components/NotificationProvider/ControlledNotification.tsx b/packages/components/src/components/NotificationProvider/ControlledNotification.tsx index 61d15d2f1..577cf8206 100644 --- a/packages/components/src/components/NotificationProvider/ControlledNotification.tsx +++ b/packages/components/src/components/NotificationProvider/ControlledNotification.tsx @@ -22,6 +22,7 @@ export const ControlledNotification: FC = (props) => { }, onClose: () => { controller.remove(notification.meta.id); + notification.element.props.onClose?.(); }, onFocus: () => { notification.meta.autoCloseTimer.pause();