Skip to content

Commit 7922882

Browse files
committed
[fixed] better gutter width detection
1 parent 1c6a481 commit 7922882

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/TimeGrid.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,14 @@ let TimeGrid = React.createClass({
203203
let isRtl = this.props.rtl;
204204
let header = this.refs.headerCell;
205205
let width = this._gutterWidth
206+
let gutterCells = [findDOMNode(this.refs.gutter), ...this._gutters]
206207
let isOverflowing = this.refs.content.scrollHeight > this.refs.content.clientHeight;
207208

208-
this._gutterWidth = getWidth(findDOMNode(this.refs.gutter));
209+
this._gutterWidth = Math.max(...gutterCells.map(getWidth));
209210

210211
if (width !== this._gutterWidth) {
211212
width = this._gutterWidth + 'px';
212-
this._gutters.forEach(node => node.style.width = width)
213+
gutterCells.forEach(node => node.style.width = width)
213214
}
214215

215216
if (isOverflowing) {

0 commit comments

Comments
 (0)