Skip to content

Commit 160e251

Browse files
authored
fix: correct time-header-gutter (jquense#2219)
make sure the header gutter is measured properly
1 parent 55e007a commit 160e251

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/TimeGrid.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ export default class TimeGrid extends Component {
2929
getSnapshotBeforeUpdate() {
3030
this.calculateScroll()
3131
this.checkOverflow()
32-
33-
if (this.props.width == null) {
34-
this.measureGutter()
35-
}
3632
return null
3733
}
3834

3935
componentDidMount() {
36+
if (this.props.width == null) {
37+
this.measureGutter()
38+
}
4039
this.applyScroll()
4140

4241
window.addEventListener('resize', this.handleResize)

src/sass/time-column.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
}
111111

112112
.rbc-header,
113-
.rbc-day-bg, {
113+
.rbc-day-bg {
114114
width: 140px;
115115
// min-width: 0;
116116
flex: 1 1 0;

0 commit comments

Comments
 (0)