@atlaskit/layer-manager
Advanced tools
Comparing version 2.5.5 to 2.5.6
# @atlaskit/layer-manager | ||
## 2.5.6 | ||
- [patch] update flow dep, fix flow errors [722ad83](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/722ad83) | ||
## 2.5.5 | ||
@@ -4,0 +7,0 @@ - [patch] AK-4064 ensure unmountComponentAtNode is called for components rendered via ReactDOM.render [e3153c3](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/e3153c3) |
@@ -102,3 +102,6 @@ 'use strict'; | ||
(0, _reactDom.render)(this.renderChildren(children), this.portalElement); | ||
if (this.portalElement) { | ||
var portal = this.portalElement; | ||
(0, _reactDom.render)(this.renderChildren(children), portal); | ||
} | ||
} | ||
@@ -108,20 +111,19 @@ }, { | ||
value: function componentWillUnmount() { | ||
var _this3 = this; | ||
// re-render an empty react tree into the portal element so that any | ||
// mounted components get cleaned up and have a chance to complete their | ||
// lifecycle before the portal is removed from the dom entirely | ||
(0, _reactDom.render)(this.renderChildren(), this.portalElement, function () { | ||
// allow time for transitions to complete before the dom is cleaned up | ||
// five seconds is an arbitary number, but is more than any of our | ||
// animations need to complete | ||
setTimeout(function () { | ||
var target = document.body; | ||
var portal = _this3.portalElement; | ||
if (target && portal) { | ||
if (this.portalElement) { | ||
var portal = this.portalElement; | ||
(0, _reactDom.render)(this.renderChildren(), portal, function () { | ||
// allow time for transitions to complete before the dom is cleaned up | ||
// five seconds is an arbitary number, but is more than any of our | ||
// animations need to complete | ||
setTimeout(function () { | ||
var target = document.body; | ||
if (!target) return; | ||
(0, _reactDom.unmountComponentAtNode)(portal); | ||
target.removeChild(portal); | ||
} | ||
}, 5000); | ||
}); | ||
}, 5000); | ||
}); | ||
} | ||
} | ||
@@ -128,0 +130,0 @@ }, { |
@@ -72,3 +72,6 @@ import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of'; | ||
render(this.renderChildren(children), this.portalElement); | ||
if (this.portalElement) { | ||
var portal = this.portalElement; | ||
render(this.renderChildren(children), portal); | ||
} | ||
} | ||
@@ -78,20 +81,19 @@ }, { | ||
value: function componentWillUnmount() { | ||
var _this3 = this; | ||
// re-render an empty react tree into the portal element so that any | ||
// mounted components get cleaned up and have a chance to complete their | ||
// lifecycle before the portal is removed from the dom entirely | ||
render(this.renderChildren(), this.portalElement, function () { | ||
// allow time for transitions to complete before the dom is cleaned up | ||
// five seconds is an arbitary number, but is more than any of our | ||
// animations need to complete | ||
setTimeout(function () { | ||
var target = document.body; | ||
var portal = _this3.portalElement; | ||
if (target && portal) { | ||
if (this.portalElement) { | ||
var portal = this.portalElement; | ||
render(this.renderChildren(), portal, function () { | ||
// allow time for transitions to complete before the dom is cleaned up | ||
// five seconds is an arbitary number, but is more than any of our | ||
// animations need to complete | ||
setTimeout(function () { | ||
var target = document.body; | ||
if (!target) return; | ||
unmountComponentAtNode(portal); | ||
target.removeChild(portal); | ||
} | ||
}, 5000); | ||
}); | ||
}, 5000); | ||
}); | ||
} | ||
} | ||
@@ -98,0 +100,0 @@ }, { |
{ | ||
"name": "@atlaskit/layer-manager", | ||
"version": "2.5.4" | ||
"version": "2.5.5" | ||
} |
{ | ||
"name": "@atlaskit/layer-manager", | ||
"version": "2.5.5", | ||
"version": "2.5.6", | ||
"description": "A React Component for managing layers", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
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
70660
1705