Skip to main content

onBeforeTaskSelected

Description

Fires before the user selects a task

onBeforeTaskSelected: (id: string | number) => boolean;

Parameters

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

Returns

  • result - (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onBeforeTaskSelected", function(id){
//any custom logic here
return true;
});

Details

The event is blockable. Return false to cancel the default processing.