fires when the user clicks on the 'Delete' button in the lightbox
id | string|number | the task id (the task opened in the lightbox) |
boolean | defines whether the default action of the event will be triggered (true) or canceled (false) |
gantt.attachEvent("onLightboxDelete", function(id){
const task = gantt.getTask(id);
if (task.duration > 60){
alert("The duration is too long. Please, try again");
return false;
}
return true;
})
The event is blockable. Return false to cancel the 'delete' operation and keep the lightbox open.