react-notification
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -43,3 +43,4 @@ 'use strict'; | ||
value: function componentWillReceiveProps(nextProps) { | ||
if (nextProps.onDismiss && nextProps.isActive && !this.props.isActive) { | ||
if (nextProps.onDismiss && this.props.onDismiss === nextProps.onDismiss && nextProps.isActive && !this.props.isActive) { | ||
clearTimeout(this.dismissTimeout); | ||
this.dismissTimeout = setTimeout(nextProps.onDismiss, nextProps.dismissAfter); | ||
@@ -46,0 +47,0 @@ } |
@@ -27,8 +27,2 @@ 'use strict'; | ||
/** | ||
* The notification list does not have any state, so use a | ||
* pure function here. It just needs to return the stacked array | ||
* of notification components. | ||
*/ | ||
var StackedNotification = function (_Component) { | ||
@@ -35,0 +29,0 @@ _inherits(StackedNotification, _Component); |
@@ -35,2 +35,3 @@ import React, { Component } from 'react'; | ||
onDismiss={this.toggleNotification.bind(this)} | ||
onClick={() => this.setState({ isActive: false })} | ||
/> | ||
@@ -37,0 +38,0 @@ </div> |
{ | ||
"name": "react-notification", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "Snackbar style notification component for React.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
354913
615