Skip to content

Commit 5ac5c30

Browse files
committed
[fixed] reset gutter widths before calculations
1 parent 7df63a0 commit 5ac5c30

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/TimeGrid.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,13 @@ let TimeGrid = React.createClass({
206206
let gutterCells = [findDOMNode(this.refs.gutter), ...this._gutters]
207207
let isOverflowing = this.refs.content.scrollHeight > this.refs.content.clientHeight;
208208

209+
if (width)
210+
gutterCells.forEach(
211+
node => node.style.width = '');
212+
209213
this._gutterWidth = Math.max(...gutterCells.map(getWidth));
210214

211-
if (width !== this._gutterWidth) {
215+
if (this._gutterWidth && width !== this._gutterWidth) {
212216
width = this._gutterWidth + 'px';
213217
gutterCells.forEach(node => node.style.width = width)
214218
}

0 commit comments

Comments
 (0)