Skip to content

Task Status

Add a status checkbox to mark tasks as done. This example uses a done field and changes the task bar color when it is checked. Click a checkbox to try it.

import { GanttPlugin, createDefaultTaskTableColumn } from '@revolist/gantt';
import { RowStatusPlugin } from '@revolist/revogrid-pro';
grid.plugins = [GanttPlugin, RowStatusPlugin];
grid.columns = [
{ prop: 'done', name: 'Done', size: 64, rowStatus: { attribute: 'data-done' } },
createDefaultTaskTableColumn('name'),
];
grid.gantt = {
...project,
visuals: {
showTaskLabels: 'tasks',
taskBarColorHook: ({ row }) => 'done' in row && row.done === true
? { barColor: '#94a3b8', progressColor: '#64748b' }
: undefined,
},
};

RowStatusPlugin stores the checkbox value in the task’s done field. The color hook controls the timeline appearance independently. See Row Status for row styling and configuration.