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

React Scheduler > Scheduler automatically expands the children of the dragged

Asked by Andy
1 day ago.

Hello,

This is our data values for resource and event.

const resource = {
    "id": "phase--1081526",
    "minHeight": 55,
    "expanded": false,
    "children": [
        {
            "id": "milestone--1365016",
            "minHeight": 55,
            "expanded": false,
            "children": []
        },
        {
            "id": "milestone--1365015",
            "minHeight": 55,
            "expanded": false,
            "children": []
        },
        {
            "id": "phase--1363775",
            "minHeight": 55,
            "expanded": false,
            "children": []
        }
    ]
}

const events = [{
    "id": "phase--1081526",
    "start": "2025-08-30T00:00:00",
    "end": "2025-11-10T23:59:59.999",
    "resource": "phase--1081526",
    "height": 23,
    "clickDisabled": false,
    "text": ""
}]

<Scheduler resources={resources} events={events} />

This is the initial state of the app, where nothing is expanded.

When I start to move the “Phase 1” (id = “phase--1081526”) event bar, its children automatically appears, as if the group is expanded. However, we are sure that there is no code that updates the collapse state (we store it in a useState) while moving the item.

Observation:

  • When console logging `resources` array, I notice the `expanded` flag becomes true for the moved resource (Phase 1, or id = “phase--1081526”) temporarily, and switches back to false - the original value.

  • This issue also happens when I hard-code `expanded` to false always for all the resources.

  • Other resources at the same level don’t experience this - only the one being moved.

Can you provide guidance? Thank you!

Answer posted by Dan Letecky [DayPilot]
16 hours ago.

Hi Andy,

By default, the Scheduler expands parents nodes automatically when you drag an event over them. You can disable this behavior using the treeAutoExpand property (set the value to false).

Comment posted by Andy
11 hours ago.

Thank you, Dan. Works like a charm.

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