Skip to main content

isSelectedTask

Description

Checks whether the specified task is currently selected

isSelectedTask: (task: string | number) => boolean

Parameters

  • task - (required) string | number - the task's id

Returns

  • value - (boolean) - 'true' if the specified task is currently selected, otherwise - 'false'

Example

gantt.templates.task_class = 
gantt.templates.grid_row_class =
gantt.templates.task_row_class = function (start, end, task) {
if (gantt.isSelectedTask(task.id))
return "gantt_selected";
};

Details

note

This method is defined in the multiselect extension, so you need to activate the multiselect plugin. Read the details in the Multi-Task Selection article.