Function auto schedule [React]


I have a button auto-schedule, but I don’t know to implement this button auto-schedule.
I already read the documentation but I have stacked it because in the documentation not use the button.

thank you.


One of the options is to attach the click listener on window inside the useEffect method, and run the Gantt functionality from this listener using, as follows:

window.addEventListener('click', function (e) {
    if (".toolbar")) {
        if ( === "auto_scheduling") {
            gantt.config.auto_scheduling = !gantt.config.auto_scheduling;
                if (gantt.config.auto_scheduling) gantt.autoSchedule();

Please check the React demo:

Steps to run:
Run yarn install
Run yarn start

Hello Sir…
Thank you, you give me an example of a project.
I hope my issue solved…

I’m sorry,
I’m new open and reply. :pray: