diff --git a/src/NotificationItem.jsx b/src/NotificationItem.jsx index a8e1fbb..882ba34 100644 --- a/src/NotificationItem.jsx +++ b/src/NotificationItem.jsx @@ -264,7 +264,7 @@ var NotificationItem = React.createClass({ } if (this.state.visible && !this.state.removed) { - notificationStyle.height = this._height; + //notificationStyle.height = this._height; // this prevents having an automated height when placing high children in notification notificationStyle[cssByPos.property] = 0; } diff --git a/src/NotificationSystem.jsx b/src/NotificationSystem.jsx index adbef3e..d39ed4f 100644 --- a/src/NotificationSystem.jsx +++ b/src/NotificationSystem.jsx @@ -139,14 +139,14 @@ var NotificationSystem = React.createClass({ } } - notifications.push(_notification); - - if (typeof _notification.onAdd === 'function') { - notification.onAdd(_notification); - } + notifications.push(_notification); this.setState({ notifications: notifications + }, function(){ + if (typeof notification.onAdd === 'function') { + notification.onAdd(_notification); + } }); return _notification;