is it possible to collapse only child not parent node
Support Forum
Hi,
You can do something like this:
tbar:{
items: [
{
tag: 'button',
text:'onClick',
onClick(){
gantt.taskStore.records.forEach(task => {
if(!task.isLeaf && !task.parent.isRoot){
gantt.collapse(task);
}
})
}
}
]
}
https://bryntum.com/products/gantt/docs/api/Core/data/mixin/TreeNode#property-isLeaf
https://bryntum.com/products/gantt/docs/api/Core/data/mixin/TreeNode#property-isRoot
https://bryntum.com/products/gantt/docs/api/Grid/view/GridBase#function-collapse
Hope it helps
Regards,
Ghous