Locked Tasks
Locked tasks let an application protect individual tasks after approval, baseline capture, phase closure, or any other workflow decision. A locked task remains visible in the task table and timeline, but packaged Gantt task mutations are rejected for that task.
Set locked: true on the task entity:
const tasks = [ { id: 'design-signoff', projectId: 'project-1', parentId: null, wbsCode: '1', name: 'Design sign-off', type: 'milestone', status: 'done', startDate: '2026-04-15', endDate: '2026-04-15', durationDays: 1, progressPercent: 100, calendarId: 'standard', isCritical: false, tags: ['approved'], locked: true, },];What It Blocks
Section titled “What It Blocks”locked: true blocks packaged task mutations for the locked task:
- Timeline task movement and resizing.
- Split creation, movement, and removal.
- Progress updates.
- Inline task-field edits routed through the Gantt task mutation service.
- Indent and outdent actions.
- Child task creation under a locked parent.
- Delete when the selected task subtree contains a locked task.
Blocked task mutations return readonly-task and leave task data unchanged.
What Still Works
Section titled “What Still Works”Locking a task does not remove it from scheduling, rendering, or inspection flows:
- The task still renders in the table and timeline.
- Scheduler recalculation can still read the task and include it in dependencies, critical path, baselines, and diagnostics.
- Search, filter, sort, expand/collapse, scroll, and zoom remain available.
- Non-locked tasks continue to edit normally.
Boundaries
Section titled “Boundaries”TaskEntity.locked is task-level protection, not a complete permission or checkout system.
Dependency changes are not globally disabled by locking a task. Assignment/resource edits are also handled by their own mutation service. Use gantt.readOnly when the whole project should reject packaged task, dependency, and assignment mutations.
For application-specific policy, pair locked tasks with cancelable Gantt events or validation recipes.
grid.addEventListener('gantt-before-task-change', (event) => { if (lockedTaskIds.has(event.detail.taskId)) { event.preventDefault(); }});Visual Indicators
Section titled “Visual Indicators”Use the status indicator helpers when you want to show a lock label, class name, icon, or tooltip in a custom renderer.
const status = createTaskStatusIndicators({ taskId: row.id, taskLocked: row.locked === true,});
renderIndicatorCell({ className: status.classNames.join(' '), title: status.label, indicators: status.indicators,});The helper returns metadata only, so the host application can choose the exact icon and placement.
Context Menu
Section titled “Context Menu”The built-in Gantt row context menu hides hierarchy actions when the selected task is locked. Mutating row actions are also guarded by the task mutation service, so direct calls still return readonly-task.