onLightboxDelete
Description
Fires when the user clicks on the 'Delete' button in the lightbox
onLightboxDelete: (id: string | number) => boolean;
Parameters
id- (required) string | number - the task id (the task opened in the lightbox)
Returns
result- (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)
Example
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;
})
Details
The event is blockable. Return false to cancel the 'delete' operation and keep the lightbox open.