Page 1 of 1
[INFO REQ] Full force sync
Posted: Thu Sep 29, 2022 7:31 am
by tikhonov.a.p
Good afternoon, there is the following situation.
- The backend returns a response to load with slightly inconsistent data, incorrect dates
- After downloading, gantt fixes them, which is true.
- However, an attempt to save the corrected data (sync()) does not lead to anything.
Can you tell me if it is possible to force the entire store to be resaved? To correct the "wrongness" of the data
Re: [INFO REQ] Full force sync
Posted: Thu Sep 29, 2022 8:28 am
by mats
That should happen automatically, any chance you can drop us a small test case with data so we can debug it?
Re: [INFO REQ] Full force sync
Posted: Thu Sep 29, 2022 1:10 pm
by tikhonov.a.p
Yes, on the UI it happens automatically.
However, these changes are not considered changes (an empty array is returned if gantt.project.changes is requested)
As a consequence gantt.project.sync does nothing
I need fixes that become visible on the UI to be written to the backend
Re: [INFO REQ] Full force sync
Posted: Thu Sep 29, 2022 3:46 pm
by marcio
Hey tikhonov.a.p,
Perhaps a possible approach would be to listen to dataReady event (when all the calculations are done) https://www.bryntum.com/docs/gantt/api/Gantt/model/ProjectModel#event-dataReady
And then use the sync method here https://www.bryntum.com/docs/gantt/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync
Also, a good place to look would be the autosync config https://www.bryntum.com/docs/gantt/api/Scheduler/crud/AbstractCrudManagerMixin#config-autoSync
But as Mats suggested, a sample project with sample data would be really nice and would make it easier for us to assist you.