File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,15 +68,10 @@ var CollapsableMixin = {
6868 var node = this . getCollapsableDOMNode ( ) ;
6969
7070 this . _removeEndTransitionListener ( ) ;
71- if ( node && nextProps . expanded !== this . props . expanded && this . props . expanded ) {
72- node . style [ dimension ] = this . getCollapsableDimensionValue ( ) + 'px' ;
73- }
7471 } ,
7572
7673 componentDidUpdate : function ( prevProps , prevState ) {
77- if ( this . state . collapsing !== prevState . collapsing ) {
78- this . _afterRender ( ) ;
79- }
74+ this . _afterRender ( ) ;
8075 } ,
8176
8277 _afterRender : function ( ) {
@@ -89,17 +84,12 @@ var CollapsableMixin = {
8984 } ,
9085
9186 _updateDimensionAfterRender : function ( ) {
92- var dimension = ( typeof this . getCollapsableDimension === 'function' ) ?
93- this . getCollapsableDimension ( ) : 'height' ;
9487 var node = this . getCollapsableDOMNode ( ) ;
95-
9688 if ( node ) {
97- if ( this . isExpanded ( ) && ! this . state . collapsing ) {
98- node . style [ dimension ] = 'auto' ;
99- } else {
100- node . style [ dimension ] = this . isExpanded ( ) ?
101- this . getCollapsableDimensionValue ( ) + 'px' : '0px' ;
102- }
89+ var dimension = ( typeof this . getCollapsableDimension === 'function' ) ?
90+ this . getCollapsableDimension ( ) : 'height' ;
91+ node . style [ dimension ] = this . isExpanded ( ) ?
92+ this . getCollapsableDimensionValue ( ) + 'px' : '0px' ;
10393 }
10494 } ,
10595
You can’t perform that action at this time.
0 commit comments