From 160e251f288174a469932599251af06f179a47f9 Mon Sep 17 00:00:00 2001 From: Steve 'Cutter' Blades Date: Mon, 11 Jul 2022 08:19:30 -0500 Subject: [PATCH] fix: correct time-header-gutter (#2219) make sure the header gutter is measured properly --- src/TimeGrid.js | 7 +++---- src/sass/time-column.scss | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/TimeGrid.js b/src/TimeGrid.js index 10181ac4c..ce68957ca 100644 --- a/src/TimeGrid.js +++ b/src/TimeGrid.js @@ -29,14 +29,13 @@ export default class TimeGrid extends Component { getSnapshotBeforeUpdate() { this.calculateScroll() this.checkOverflow() - - if (this.props.width == null) { - this.measureGutter() - } return null } componentDidMount() { + if (this.props.width == null) { + this.measureGutter() + } this.applyScroll() window.addEventListener('resize', this.handleResize) diff --git a/src/sass/time-column.scss b/src/sass/time-column.scss index fce2d3eb4..7b172f59a 100644 --- a/src/sass/time-column.scss +++ b/src/sass/time-column.scss @@ -110,7 +110,7 @@ } .rbc-header, - .rbc-day-bg, { + .rbc-day-bg { width: 140px; // min-width: 0; flex: 1 1 0;