Now, I need to update 3000+ tasks, but I found that the interface got stuck during the modification process. Is there any good way to optimize it
Hello,
You can use the batchUpdate
method, which allows updating multiple tasks or links at once:
function updateAllTasksWithBatch() {
gantt.batchUpdate(() => {
gantt.eachTask((task) => {
task.duration += 1;
task.end_date = gantt.calculateEndDate(task.start_date, task.duration);
gantt.updateTask(task.id);
});
});
}
Here is an example: DHTMLX Snippet Tool