From 7922882c370e773929a461020ec16f19f8039a1e Mon Sep 17 00:00:00 2001 From: jquense Date: Sun, 29 Nov 2015 13:59:47 -0500 Subject: [PATCH] [fixed] better gutter width detection --- src/TimeGrid.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TimeGrid.jsx b/src/TimeGrid.jsx index e62965720..f15f40f0a 100644 --- a/src/TimeGrid.jsx +++ b/src/TimeGrid.jsx @@ -203,13 +203,14 @@ let TimeGrid = React.createClass({ let isRtl = this.props.rtl; let header = this.refs.headerCell; let width = this._gutterWidth + let gutterCells = [findDOMNode(this.refs.gutter), ...this._gutters] let isOverflowing = this.refs.content.scrollHeight > this.refs.content.clientHeight; - this._gutterWidth = getWidth(findDOMNode(this.refs.gutter)); + this._gutterWidth = Math.max(...gutterCells.map(getWidth)); if (width !== this._gutterWidth) { width = this._gutterWidth + 'px'; - this._gutters.forEach(node => node.style.width = width) + gutterCells.forEach(node => node.style.width = width) } if (isOverflowing) {