search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

When expanding tabs in scheduler vertical scrolling stops working

Asked by Anonymous
3 days ago.

Hi

I use scheduler with resource tree (https://javascript.daypilot.org/demo/scheduler/tree.html)

In the above tutorial the tabs are opened by default but in my program they are closed. (I do not know how to open them by default)


I have many resource category so I put button to open all the tabes like this.

dp.rows.find("one").expand();

dp.rows.find("two").expand();

dp.rows.find("ten").expand();

The tree gets expanded but the vertical scrolling for the resource stops working. It scrolls all the page itself.

I want to know how to fix it.

Thank you

Martin

Answer posted by Anonymous
3 days ago.

Hi

The problem gets fixed by using the following one to open all the tabls.

dp.rows.expandAll();

Thank you for the great library.

Martin

Comment posted by Dan Letecky [DayPilot]
3 days ago.

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.

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):