File tree 1 file changed +8
-9
lines changed
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -208,22 +208,21 @@ let TimeGrid = React.createClass({
208
208
let gutterCells = [ findDOMNode ( this . refs . gutter ) , ...this . _gutters ]
209
209
let isOverflowing = this . refs . content . scrollHeight > this . refs . content . clientHeight ;
210
210
211
- if ( width )
212
- gutterCells . forEach (
213
- node => node . style . width = '' ) ;
211
+ if ( ! width ) {
212
+ this . _gutterWidth = Math . max ( ...gutterCells . map ( getWidth ) ) ;
214
213
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
+ }
220
218
}
221
219
222
220
if ( isOverflowing ) {
223
221
classes . addClass ( header , 'rbc-header-overflowing' )
224
222
this . refs . headerCell . style [ ! isRtl ? 'marginLeft' : 'marginRight' ] = '' ;
225
223
this . refs . headerCell . style [ isRtl ? 'marginLeft' : 'marginRight' ] = scrollbarSize ( ) + 'px' ;
226
- } else {
224
+ }
225
+ else {
227
226
classes . removeClass ( header , 'rbc-header-overflowing' )
228
227
}
229
228
}
You can’t perform that action at this time.
0 commit comments