schedule-tasks
The functionality is available in PRO Edition only
PRODescription
Triggers cascading updates of tasks in auto scheduling modeThe schedule-tasks action triggers recalculation of all tasks according to auto scheduling rules. It updates all dependent tasks based on end-to-start links, considering lag and project start constraints. Normally, this action is called automatically when tasks change (start, end, duration, or links), but it can also be invoked manually.
Usage
"schedule-tasks": () => void;
Parameters
The callback of the action takes no parameters.
Example
import { useRef } from "react";
import { Gantt } from "@svar/react-gantt";
import { Button } from "@svar-ui/react-core";
import { getData } from "../data";
export default function Example() {
const { tasks, links } = getData();
const apiRef = useRef(null);
function runSchedule() {
apiRef.current?.exec("schedule-tasks", {});
}
return (
<>
<Button onClick={runSchedule}>Apply Auto Schedule</Button>
<Gantt ref={apiRef} tasks={tasks} links={links} schedule={{ auto: true }} />
</>
);
}
Related articles: