Skip to content

Commit cae5b61

Browse files
committed
Call notification.onRemove when provided
fixes #10
1 parent fb46b67 commit cae5b61

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

dist/react-notification-system-redux.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ var Notifications = function (_React$Component) {
147147
onRemove: function () {
148148
function onRemove() {
149149
_this2.context.store.dispatch(actions.hide(notification.uid));
150+
notification.onRemove && notification.onRemove();
150151
}
151152

152153
return onRemove;

dist/react-notification-system-redux.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/notifications.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ var Notifications = function (_React$Component) {
7373
onRemove: function () {
7474
function onRemove() {
7575
_this2.context.store.dispatch(actions.hide(notification.uid));
76+
notification.onRemove && notification.onRemove();
7677
}
7778

7879
return onRemove;

src/notifications.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Notifications extends React.Component {
2828
...notification,
2929
onRemove: () => {
3030
this.context.store.dispatch(actions.hide(notification.uid));
31+
notification.onRemove && notification.onRemove();
3132
}
3233
});
3334
});

0 commit comments

Comments
 (0)