rc-collapse
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -12,2 +12,4 @@ 'use strict'; | ||
var cssAnimation = require('css-animation'); | ||
var event = require('css-animation/lib/Event'); | ||
var isSupportCssAnimate = event.endEvents.length > 0; | ||
@@ -95,4 +97,12 @@ module.exports = createClass({ | ||
var el = findDOMNode(this.refs.content); | ||
if (!isSupportCssAnimate) { | ||
el.style.height = opacity ? 'auto' : 0; | ||
return; | ||
} | ||
var scrollHeight = el.scrollHeight + 'px'; | ||
var collapsing = this.props.prefixCls + '-collapsing'; | ||
cssAnimation.addClass(el, collapsing); | ||
// start state | ||
@@ -107,2 +117,3 @@ el.style.height = opacity ? scrollHeight : 0; | ||
cssAnimation.setTransition(el, 'Property', ''); | ||
cssAnimation.removeClass(el, collapsing); | ||
}); | ||
@@ -109,0 +120,0 @@ } |
{ | ||
"name": "rc-collapse", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "rc-collapse ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -33,3 +33,3 @@ # rc-collapse | ||
online example: http://react-component.github.io/collapse/examples/ | ||
online example: http://react-component.github.io/collapse/ | ||
@@ -36,0 +36,0 @@ |
Sorry, the diff of this file is not supported yet
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
13994
270