Open RafaelKC opened 1 year ago
@RafaelKC,
It is not expected to change the task parameters in the onBeforeTaskChanged
event as it fires after you dragged a task, but before the changes are applied. Please clarify why you need to do that and what result you want to get.
Also, it seems that you have the split tasks. After you change the row_height
for a child task, it doesn't affect the row_height
of the parent tasks, Gantt just doesn't have that functionality. You will need to manually update that parameter for all parent tasks that are rendered in the split
mode.
You can use the eachParent
method to iterate all parent tasks:
https://docs.dhtmlx.com/gantt/api__gantt_eachparent.html
Here is an example of how it can be implemented:
gantt.attachEvent('onBeforeTaskChanged', (taskId) => {
const task = gantt.getTask(taskId);
task.row_height = 100;
gantt.eachParent(function(parent){
parent.row_height = 100;
}, taskId);
gantt.render();
return true
})
Hi, I`m using licensed gantt in version 8.0.4, I'm trying to set task.row_height as below:
But it`s affect just the task bar height. I have multiples task in same row.