rc-animate
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -82,5 +82,5 @@ 'use strict'; | ||
var currentChildren = exclusive ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children; | ||
var newChildren = _ChildrenUtils2['default'].mergeChildren(currentChildren, nextChildren); | ||
var newChildren = exclusive ? nextChildren : _ChildrenUtils2['default'].mergeChildren(currentChildren, nextChildren); | ||
if (showProp) { | ||
if (showProp && !exclusive) { | ||
newChildren = newChildren.map(function (c) { | ||
@@ -96,2 +96,5 @@ if (!c.props[showProp] && (0, _ChildrenUtils.isShownInChildren)(currentChildren, c, showProp)) { | ||
if (exclusive) { | ||
currentChildren.forEach(function (c) { | ||
_this.stop(c.key); | ||
}); | ||
// make middle state children invalid | ||
@@ -150,4 +153,7 @@ // restore to last props children | ||
performEnter: function performEnter(key) { | ||
this.currentlyAnimatingKeys[key] = true; | ||
this.refs[key].componentWillEnter(this._handleDoneEntering.bind(this, key)); | ||
// may already remove by exclusive | ||
if (this.refs[key]) { | ||
this.currentlyAnimatingKeys[key] = true; | ||
this.refs[key].componentWillEnter(this._handleDoneEntering.bind(this, key)); | ||
} | ||
}, | ||
@@ -172,4 +178,7 @@ | ||
performLeave: function performLeave(key) { | ||
this.currentlyAnimatingKeys[key] = true; | ||
this.refs[key].componentWillLeave(this._handleDoneLeaving.bind(this, key)); | ||
// may already remove by exclusive | ||
if (this.refs[key]) { | ||
this.currentlyAnimatingKeys[key] = true; | ||
this.refs[key].componentWillLeave(this._handleDoneLeaving.bind(this, key)); | ||
} | ||
}, | ||
@@ -176,0 +185,0 @@ |
{ | ||
"name": "rc-animate", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "css-transition ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
18569
390