Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/DayColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ class DayColumn extends React.Component {
this.slotMetrics = this.slotMetrics.update(nextProps)
}

componentDidUpdate(prevProps) {
if (prevProps.date.getTime() !== this.props.date.getTime()) {
Copy link
Copy Markdown
Owner

@jquense jquense Oct 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resolution of this comparison should be minutes: !dates.eq(prevDate, nextDate, 'minutes')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What method are you referencing here? As far as I can see, utils/dates.js does not come with an eq method.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that method comes from the package date-arithmetic which utils\dates.js extends.

if (this.props.isNow) {
this.positionTimeIndicator()
this.triggerTimeIndicatorUpdate()
Comment thread
jdaberkow marked this conversation as resolved.
}
}
}

triggerTimeIndicatorUpdate() {
// Update the position of the time indicator every minute
this._timeIndicatorTimeout = window.setTimeout(() => {
Expand Down Expand Up @@ -188,7 +197,7 @@ class DayColumn extends React.Component {
events,
accessors,
slotMetrics,
minimumStartDifference: Math.ceil(step * timeslots / 2),
minimumStartDifference: Math.ceil((step * timeslots) / 2),
Comment thread
jdaberkow marked this conversation as resolved.
})

return styledEvents.map(({ event, style }, idx) => {
Expand Down