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

DnD Calendar jumps back to start of day when data changes (wheras default Calendar does not) #2489

Closed
4 of 5 tasks
JannikSt opened this issue Jan 21, 2024 · 1 comment
Closed
4 of 5 tasks
Labels

Comments

@JannikSt
Copy link

JannikSt commented Jan 21, 2024

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/devbox/2v7j2w

Bug description

Changing the events data in the DnD Version of the calendar causes the scroll position to reset to the start of the day. In contrast, the default Calendar (without DnD functionality) stays at the scroll position.

Demo:
https://github.com/jquense/react-big-calendar/assets/28526535/941fdcc8-41cd-49bf-847d-e2eb96dddbec

Expected Behavior

The scroll position should be consistent even with data changes.

Actual Behavior

No response

react-big-calendar version

1.8.6

React version

18.2.0

Platform/Target and Browser Versions

macOS Firefox v.121

Validations

  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a react-big-calendar issue and not an implementation issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@JannikSt JannikSt added the bug label Jan 21, 2024
@JannikSt
Copy link
Author

I have solved the problem by moving const DnDCalendar = withDragAndDrop(Calendar); outside of my component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant