react-notification-alert
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -37,3 +37,4 @@ "use strict"; | ||
notifyBC: [], | ||
notifyBR: [] | ||
notifyBR: [], | ||
notifyID: [] | ||
}; | ||
@@ -50,5 +51,4 @@ _this.onDismiss = _this.onDismiss.bind(_this); | ||
value: function componentWillUnmount() { | ||
var id = window.setTimeout(null, 0); | ||
while (id--) { | ||
window.clearTimeout(id); | ||
for (var i = 0; i < this.state.notifyID.length; i++) { | ||
window.clearTimeout(this.state.notifyID[i]); | ||
} | ||
@@ -97,3 +97,5 @@ } | ||
}.bind(this), 800); | ||
console.log(id); | ||
this.setState({ | ||
notifyID: [id].concat(this.state.notifyID) | ||
}); | ||
} | ||
@@ -145,3 +147,5 @@ sNotify = {}; | ||
}.bind(this), options.autoDismiss * 1000 + (notify.length - 1) * 1000); | ||
console.log(id); | ||
this.setState({ | ||
notifyID: [id].concat(this.state.notifyID) | ||
}); | ||
} | ||
@@ -148,0 +152,0 @@ this.setState(sNotify); |
16
index.js
@@ -13,3 +13,4 @@ import React from "react"; | ||
notifyBC: [], | ||
notifyBR: [] | ||
notifyBR: [], | ||
notifyID: [] | ||
}; | ||
@@ -21,5 +22,4 @@ this.onDismiss = this.onDismiss.bind(this); | ||
componentWillUnmount() { | ||
var id = window.setTimeout(null, 0); | ||
while (id--) { | ||
window.clearTimeout(id); | ||
for(let i = 0; i < this.state.notifyID.length; i++){ | ||
window.clearTimeout(this.state.notifyID[i]); | ||
} | ||
@@ -71,3 +71,5 @@ } | ||
); | ||
console.log(id); | ||
this.setState({ | ||
notifyID: [id].concat(this.state.notifyID) | ||
}) | ||
} | ||
@@ -123,3 +125,5 @@ sNotify = {}; | ||
); | ||
console.log(id); | ||
this.setState({ | ||
notifyID: [id].concat(this.state.notifyID) | ||
}) | ||
} | ||
@@ -126,0 +130,0 @@ this.setState(sNotify); |
{ | ||
"name": "react-notification-alert", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "React bootstrap 4 notification alert", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -135,3 +135,3 @@ # React Notification Alert | ||
[LICENSE]: ./LICENSE.md | ||
[version-badge]: https://img.shields.io/badge/version-0.0.9-blue.svg | ||
[version-badge]: https://img.shields.io/badge/version-0.0.11-blue.svg | ||
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg |
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
35678
1083