Great, thanks for the update!
To display the tree nodes in an expanded state during the initial load, you can also add expanded: true
to the resource properties, like this:
const resources = [
{
name: "Tools", id: "Tools", expanded: true, children: [
{name: "Tool 1", id: "Tool1"},
{name: "Tool 2", id: "Tool2"}
]
},
{
name: "People", id: "People", expanded: true, children: [
{name: "Person 1", id: "Person1"},
{name: "Person 2", id: "Person2"}
]
},
{
name: "Locations", id: "Locations", expanded: true, children: [
{name: "Location 1", id: "Location1"},
{name: "Location 2", id: "Location2"}
]
},
];
scheduler.update({resources});
That way, it is not necessary to call rows.expandAll(), and you can specify which nodes will be expanded and which will be collapsed.