Our powerful JS Calendar component


Post by jeff.wang »

Hi,

How to avoid the error when update the project model two times like below, since i update the eventbar, then the events have changed, so i update the project model like below, i will set the events to empty, then update project model. sometimes the startDate and endDate of eventbar show error if i don't set the empty.

this.setState({ projectModel: { events: [] } }, () => {
       this.updateProjectModel(newSourceList);
});

Image


Post by tasnim »

It's really hard to assist you with the error image and a little block of code. Could you please provide a runnable test case so we can run the app and debug it?

So we can better assist you.

Good Luck :),
Tasnim


Post by jeff.wang »

When drag the eventBar, it will show warning if i set new ProjectModel when the beforeDragResizeEnd is not finish.


Post by Animal »

I cannot understand what you are doing. What are you calling updateProjectModel on? What does it do? When are you doing it? What are you doing by calling it?

We cannot diagnose unknown code.


Post by jeff.wang »

I avoid it by that don't update ProjectModel before beforeDragResizeEnd finish.

Thank you!


Post Reply