Hi,
I am trying to trigger something for every task rendered using the addTaskLayer:
gantt.addTaskLayer({
renderer: {
render: function draw_planned(task) {
console.log(task);
}
}
});
Here is the task data that is loaded using gantt.load(url):
“tasks”: [
{
“id”: “parent-1”,
“parent”: 0,
“text”: “Parent task”,
“start_date”: “2021-09-13 09:30:00”,
“end_date”: “2021-09-13 16:30:00”,
“type”: “project”,
“render”: “split”,
“progress”: 0,
“open”: true,
},
{
“id”: “child-1”,
“parent”: “parent-1”,
“text”: “Child task”,
“start_date”: “2021-09-13 09:30:00”,
“end_date”: “2021-09-13 10:30:00”,
“open”: true,
“progress”: 0,
“color”: “black”
}
…
The issue is that child tasks that have a parent as “render”:“split”, are not received in gantt.addTaskLayer.
In the example above, the task with “child-1” for example will not reach console.log(task);
Thank you kindly