Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with scrollToTime #696

Closed
ricardonogues opened this issue Jan 18, 2018 · 1 comment
Closed

Issue with scrollToTime #696

ricardonogues opened this issue Jan 18, 2018 · 1 comment

Comments

@ricardonogues
Copy link

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)

@t-nunes
Copy link

t-nunes commented Jan 19, 2018

:( i have this problem too :(

jquense added a commit that referenced this issue Feb 5, 2018
@jquense jquense closed this as completed in c756568 Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants