Перейти к основному содержимому

onLightboxDelete

Description

Вызывает, когда пользователь нажимает кнопку 'Delete' в lightbox

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

Parameters

  • id - (required) string | number - идентификатор задачи (задача, открытая в lightbox)

Returns

  • result - (boolean) - определяет, будет ли выполнено действие по умолчанию события (true) или отменено (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

Событие можно заблокировать. Возвращение false отменяет операцию удаления и lightbox остается открытым.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.