-
Notifications
You must be signed in to change notification settings - Fork 650
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
onTimeChange called before onItemDrag #838
Comments
@atheck this happens because how the library is implemented it's hard to distinguish between a select and drag an item vs dragging the timeline to scroll. |
I would like to fix this issue, but I am just starting with open source. Can someone please guide on this ? |
Hey I want to contribute to this issue can you please assign this task to me |
i made a solution: PR: #893 |
Add conditions to trigger onTimeChange only when there's a meaningful change in the timeline (i.e., not during a drag) const handleTimeChange = () => { <Timeline |
Describe the bug
When dragging an item,
onTimeChange
is called just beforeonItemDrag
. This happens only randomly.In my case this unnecessarily causes reloading of data. When this happens, the moved item gets "recreated" and jumps back to the start position before dragging.
To Reproduce
Sometimes this will print:
Expected behavior
onTimeChange
should not be called before dragging an item.Library Version
"react-calendar-timeline": "0.27.0"
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: