Hi,
When I add a new task using taskmenu, I want to display custom icon in UI for newly added task.
I'm using typescript.
Please help how i can do that?
Thanks,
Bharat
Hi,
You could use https://bryntum.com/products/gantt/docs/api/Gantt/data/TaskStore#event-beforeAdd listener to configure the iconCls
https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel#field-iconCls
First you need a counter outside of gantt
let counter = 0;
And then add this inside of project config
taskStore : {
listeners : {
beforeAdd(event) {
// prevent first load
if (counter > 0) {
event.records[0].iconCls = 'b-fa-solid b-fa-coffee';
}
counter++;
}
}
}
Thanks for your report. I've reproduced it. Here is the ticket to track progress https://github.com/bryntum/support/issues/6563
We'll investigate it.