-
Notifications
You must be signed in to change notification settings - Fork 97
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
Drag and drop adjustment issue #165
Comments
https://user-images.githubusercontent.com/58082294/156743833-344aed1d-0e2b-462b-be05-4af039299e5a.mov |
I see, thanks for the video, I'll check this out. For now, can you send me your code for the |
I can reproduce this behavior if I use a time-consuming call in onDragEvent = async (event, newStartDate, newEndDate) => {
console.log('Calling some API...');
const result = await callMyAPI(); // time-consuming call, e.g. takes 1-2 seconds
console.log('Finished.');
// Update my local database (for example the component's state: this.setState(...))
this.updateLocalDB(event, newStartDate, newEventDate);
}; I can fix it with any of these two options: // (1) updating the local DB before the time-consuming call
this.updateLocalDB(event, newStartDate, newEventDate);
const result = await callMyAPI(); // or (2) using runAfterInteractions(), see: https://reactnative.dev/docs/interactionmanager
InteractionManager.runAfterInteractions(async () => {
const result = await callMyAPI();
// ...
});
this.updateLocalDB(event, newStartDate, newEventDate); |
Moving this discussion to #248 |
When I drop the event on midline means half in one date and half of another date then it can't adjust automatically?
Is there any way that it does not drop the event on the midline (date separate line).
The text was updated successfully, but these errors were encountered: