Hello,
According to our project requirements I need to implement next scenario:
On first data request we get just tasks tree skeleton with ids and names
As soon as skeleton is loaded we make the second request to get visible tasks detailed data and enrich existing data with it
On scroll/resize/expand we make same additional requests
Also I want to leverage Bryntum ProjectCrudManager sync feature. But if sync is used, on data enrichment it makes unnecessary update request. To make things work I need to somehow disable sync calls when I manually enrich data as described above.
I found a sort of working solution, but it doesn't look conventional and it's performance is unacceptably low. Is there better way to implement this?
async enrichTasks() {
const taskIdsToEnrich = this.getTaskIdsToEnrich();
if (!taskIdsToEnrich.length) {
return;
}
const data = await getTasksDetails.call(taskIdsToEnrich);
const { taskStore, project } = this;
data.forEach((taskData) => {
const record = taskStore.getById(taskData.id) as TaskModel;
if (record) {
record.setMultiple(taskData);
project.propagate();
record.clearChanges();
}
});
project.propagate();
}