bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

Project direction set to null after changing to Forward #10055

Open bmblb opened 2 weeks ago

bmblb commented 2 weeks ago

Reported here: https://forum.bryntum.com/viewtopic.php?f=52&t=30409&p=154459#p154459

To reproduce on advanced demo add two buttons with these two handlers and toggle modes.

onSetDirectionForward() {
    const { gantt } = this;

    console.log("Direction before change to forward: ", gantt.project.direction);

    gantt.project.direction = 'Forward';

    gantt.project.startDate = new Date();
    gantt.project.endDate = null;

    gantt.project.commitAsync().then(_ => {
        console.log("Direction after change to forward: ", gantt.project.direction);
    })
}

onSetDirectionBackward() {
    const { gantt } = this;

    console.log("Direction before change to backward: ", gantt.project.direction);

    gantt.project.direction = 'Backward';

    gantt.project.commitAsync().then(_ => {
        console.log("Direction after change to backward: ", gantt.project.direction);
    })
}