From d426ee64bac5256536f799cd8a53c8834f895b3c Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Thu, 24 Jan 2019 10:17:44 +1000 Subject: [PATCH] Apply time indicator fix https://github.com/intljusticemission/react-big-calendar/pull/1054 --- src/DayColumn.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/DayColumn.js b/src/DayColumn.js index 58bf0aa9b..db180a21d 100644 --- a/src/DayColumn.js +++ b/src/DayColumn.js @@ -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)