Skip to content

Commit

Permalink
fix: correct time-header-gutter (jquense#2219)
Browse files Browse the repository at this point in the history
make sure the header gutter is measured properly
  • Loading branch information
cutterbl committed Jul 11, 2022
1 parent 55e007a commit 160e251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/TimeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/sass/time-column.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
}

.rbc-header,
.rbc-day-bg, {
.rbc-day-bg {
width: 140px;
// min-width: 0;
flex: 1 1 0;
Expand Down

0 comments on commit 160e251

Please sign in to comment.