File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,22 +208,21 @@ let TimeGrid = React.createClass({
208208 let gutterCells = [ findDOMNode ( this . refs . gutter ) , ...this . _gutters ]
209209 let isOverflowing = this . refs . content . scrollHeight > this . refs . content . clientHeight ;
210210
211- if ( width )
212- gutterCells . forEach (
213- node => node . style . width = '' ) ;
211+ if ( ! width ) {
212+ this . _gutterWidth = Math . max ( ...gutterCells . map ( getWidth ) ) ;
214213
215- this . _gutterWidth = Math . max ( ...gutterCells . map ( getWidth ) ) ;
216-
217- if ( this . _gutterWidth && width !== this . _gutterWidth ) {
218- width = this . _gutterWidth + 'px' ;
219- gutterCells . forEach ( node => node . style . width = width )
214+ if ( this . _gutterWidth ) {
215+ width = this . _gutterWidth + 'px' ;
216+ gutterCells . forEach ( node => node . style . width = width )
217+ }
220218 }
221219
222220 if ( isOverflowing ) {
223221 classes . addClass ( header , 'rbc-header-overflowing' )
224222 this . refs . headerCell . style [ ! isRtl ? 'marginLeft' : 'marginRight' ] = '' ;
225223 this . refs . headerCell . style [ isRtl ? 'marginLeft' : 'marginRight' ] = scrollbarSize ( ) + 'px' ;
226- } else {
224+ }
225+ else {
227226 classes . removeClass ( header , 'rbc-header-overflowing' )
228227 }
229228 }
You can’t perform that action at this time.
0 commit comments