-
Notifications
You must be signed in to change notification settings - Fork 402
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
Scroll resets to first selected element in a multipleDates calendar when state is updated #239
Comments
This is a problem with the height property,
|
I fixed it by moving the component declaration out of the building method as follows:
|
Did you guys solve this? I tracked it down to the onSelect={updateSelectedCalendarDates}. Since it updates the state it then rerenders the component. I could understand that if you have the state in selected. But I tried with different statets and it still rerenders. Any update or fix? |
When using multiple dates functionality, the calendar resets to the zoom to focus on the first selected date on a re-render.
I think most users would expect the scroll to remain unchanged. Is there a way to use the
InfiniteCalendar
API to avoid this?See this CodeSandbox
Full code
The text was updated successfully, but these errors were encountered: