You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scrollToTime property seems not to be working. Here's the reason why:
On the TimeGrid component we have this in the calculateScroll method:
const { min, max, scrollToTime } = this.props;
But this method is called within a componentWillMount method and within componentWillReceiveProps method. Although the call within componentWillMount does not cause any problem the call within componentWillReceiveProps is causing the scroll to be calculated with the last value os scrollToTime and not with the current one.
A possible fix to this is to make calculateScroll to receive the date upon which the scroll is to be calculated.
Withing componentWillMount:
calculateScroll(this.props.scrollToTime)
Within componentWillReceiveProps
calculateScroll(nextProps.scrollToTime)
The text was updated successfully, but these errors were encountered:
The scrollToTime property seems not to be working. Here's the reason why:
On the TimeGrid component we have this in the calculateScroll method:
const { min, max, scrollToTime } = this.props;
But this method is called within a componentWillMount method and within componentWillReceiveProps method. Although the call within componentWillMount does not cause any problem the call within componentWillReceiveProps is causing the scroll to be calculated with the last value os scrollToTime and not with the current one.
A possible fix to this is to make calculateScroll to receive the date upon which the scroll is to be calculated.
Withing componentWillMount:
calculateScroll(this.props.scrollToTime)
Within componentWillReceiveProps
calculateScroll(nextProps.scrollToTime)
The text was updated successfully, but these errors were encountered: