rc-animate
Advanced tools
Comparing version 3.0.0-rc.5 to 3.0.0-rc.6
@@ -215,3 +215,4 @@ import _defineProperty from 'babel-runtime/helpers/defineProperty'; | ||
motionEnter = props.motionEnter, | ||
motionLeave = props.motionLeave; | ||
motionLeave = props.motionLeave, | ||
motionLeaveImmediately = props.motionLeaveImmediately; | ||
@@ -237,3 +238,3 @@ var newState = { | ||
// Leave | ||
if (prevProps && prevProps.visible && !visible && motionLeave) { | ||
if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) { | ||
newState.status = STATUS_LEAVE; | ||
@@ -258,2 +259,3 @@ newState.statusActive = false; | ||
motionLeave: PropTypes.bool, | ||
motionLeaveImmediately: PropTypes.bool, // Trigger leave motion immediately | ||
onAppearStart: PropTypes.func, | ||
@@ -260,0 +262,0 @@ onAppearActive: PropTypes.func, |
@@ -259,3 +259,4 @@ 'use strict'; | ||
motionEnter = props.motionEnter, | ||
motionLeave = props.motionLeave; | ||
motionLeave = props.motionLeave, | ||
motionLeaveImmediately = props.motionLeaveImmediately; | ||
@@ -281,3 +282,3 @@ var newState = { | ||
// Leave | ||
if (prevProps && prevProps.visible && !visible && motionLeave) { | ||
if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) { | ||
newState.status = STATUS_LEAVE; | ||
@@ -301,2 +302,3 @@ newState.statusActive = false; | ||
motionLeave: _propTypes2['default'].bool, | ||
motionLeaveImmediately: _propTypes2['default'].bool, // Trigger leave motion immediately | ||
onAppearStart: _propTypes2['default'].func, | ||
@@ -303,0 +305,0 @@ onAppearActive: _propTypes2['default'].func, |
{ | ||
"name": "rc-animate", | ||
"version": "3.0.0-rc.5", | ||
"version": "3.0.0-rc.6", | ||
"description": "css-transition ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -60,2 +60,3 @@ # rc-animate | ||
| motionLeave | boolean | true | Support motion on leave | | ||
| motionLeaveImmediately | boolean | | Trigger motionLeave immediately if visible to be false (even if it's first time append to the view) | | ||
| onAppearStart | function | | Trigger when appear start | | ||
@@ -62,0 +63,0 @@ | onAppearActive | function | | Trigger when appear active | |
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
87101
1927
240