Our pure JavaScript Scheduler component


Post by epotapov »

Is there a way of making the tree group in this example https://bryntum.com/products/schedulerpro/examples/resourceutilization/ start as collapsed?


Post by mats »

You could try calling https://bryntum.com/products/grid/docs/api/Grid/feature/Tree#function-collapseAll after you have loaded your data?


Post by epotapov »

Calling it the following way doesn't work for me.

resourceUtilization.project.on('load', () => {
    resourceUtilization.features.treeGroup.collapseAll();
});

Post by mats »

Try something like

const detacher = resourceUtilization.on({
    renderRows : async() => {
        if (resourceUtilization.store.count > 0) {
            detacher();
            resourceUtilization.features.tree.collapseAll();
        }
    },
    buffer : 100
});

Post by epotapov »

This worked perfectly, thank you!


Post Reply