rc-animate
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -74,8 +74,2 @@ 'use strict'; | ||
componentDidMount: function componentDidMount() { | ||
this.state.children.map(function (c) { | ||
return c.key; | ||
}).forEach(this.performAppear); | ||
}, | ||
getInitialState: function getInitialState() { | ||
@@ -90,5 +84,20 @@ this.currentlyAnimatingKeys = {}; | ||
componentWillReceiveProps: function componentWillReceiveProps(nextProps) { | ||
componentDidMount: function componentDidMount() { | ||
var _this = this; | ||
var showProp = this.props.showProp; | ||
var children = this.state.children; | ||
if (showProp) { | ||
children = children.filter(function (c) { | ||
return !!c.props[showProp]; | ||
}); | ||
} | ||
children.forEach(function (c) { | ||
_this.performAppear(c.key); | ||
}); | ||
}, | ||
componentWillReceiveProps: function componentWillReceiveProps(nextProps) { | ||
var _this2 = this; | ||
var nextChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(nextProps)); | ||
@@ -121,3 +130,3 @@ var props = this.props; | ||
Object.keys(currentlyAnimatingKeys).forEach(function (key) { | ||
_this.stop(key); | ||
_this2.stop(key); | ||
}); | ||
@@ -138,7 +147,7 @@ currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); | ||
if (!showInNow && showInNext) { | ||
_this.keysToEnter.push(key); | ||
_this2.keysToEnter.push(key); | ||
} | ||
} | ||
} else if (!hasPrev) { | ||
_this.keysToEnter.push(key); | ||
_this2.keysToEnter.push(key); | ||
} | ||
@@ -158,7 +167,7 @@ }); | ||
if (!showInNext && showInNow) { | ||
_this.keysToLeave.push(key); | ||
_this2.keysToLeave.push(key); | ||
} | ||
} | ||
} else if (!hasNext) { | ||
_this.keysToLeave.push(key); | ||
_this2.keysToLeave.push(key); | ||
} | ||
@@ -165,0 +174,0 @@ }); |
{ | ||
"name": "rc-animate", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"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
20568
448