inactiveTasks
The functionality is available in PRO Edition only
PRODescription
Optional. Allows suspending tasks and excluding them from calculationsUsage
inactiveTasks?: boolean;
Parameters
true- enables the inactive-task functionality:- inactive tasks keep their dates and are rendered with grey styling in the grid and on the chart, but do not contribute to auto scheduling, critical path, slack, and resource load calculations; the s-curve and the progress line skip them as well
- a task can be marked as inactive with the
inactive: truefield of thetasksdata object - the Inactive checkbox appears in the Scheduling tab of the Editor
false- (default) disables the inactive-task functionality
Example
import { Gantt } from "@svar/react-gantt";
import { getData } from "../data";
const { links, scales, columns } = getData();
const tasks = [
{
id: 1,
open: true,
start: new Date(2027, 11, 6),
duration: 8,
text: "Mobile app release",
progress: 60,
type: "summary",
},
{
id: 2,
parent: 1,
start: new Date(2027, 11, 6),
duration: 4,
text: "API integration",
progress: 80,
inactive: true,
},
];
function App() {
return (
<Gantt
tasks={tasks}
scales={scales}
columns={columns}
links={links}
inactiveTasks={true}
/>
);
}
export default App;
Related articles: