-
Notifications
You must be signed in to change notification settings - Fork 4
Closed as not planned
Labels
Description
Go to gantt basic example: https://bryntum.com/products/gantt/examples/basic/, update the code with the below, split a task and you can see the task segment does not inherit the custom fields.
class Ne extends TaskModel {
static fields = [
{ name : 'note', persist : true }
];
}
new Gantt({
appendTo : 'container',
dependencyIdField : 'sequenceNumber',
rowHeight : 45,
tickSize : 45,
barMargin : 8,
project : {
taskModelClass : Ne,
autoSetConstraints : true, // automatically introduce `startnoearlier` constraint if tasks do not use constraints, dependencies, or manuallyScheduled
autoLoad : true,
transport : {
load : {
url : '../_datasets/launch-saas.json'
}
}
},
columns : [
{ type : 'name', width : 250 },
{
field : 'note'
}
],
// Custom task content, display task name on child tasks
taskRenderer({ taskRecord }) {
if (taskRecord.isLeaf && !taskRecord.isMilestone) {
return StringHelper.encodeHtml(taskRecord.name);
}
}
});