Skip to content

Commit

Permalink
Apply time indicator fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Jamieson committed Jan 24, 2019
1 parent 21cb551 commit d426ee6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/DayColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ class DayColumn extends React.Component {
}
}

componentDidUpdate(prevProps) {
// https://github.com/intljusticemission/react-big-calendar/pull/1054
if (!dates.eq(prevProps.date, this.props.date, 'minutes')) {
if (this.props.isNow) {
this.positionTimeIndicator()
this.triggerTimeIndicatorUpdate()
}
}
}

componentWillUnmount() {
this._teardownSelectable()
window.clearTimeout(this._timeIndicatorTimeout)
Expand Down

0 comments on commit d426ee6

Please sign in to comment.