onBeforeLightbox
Description
라이트박스(편집 폼)가 열리기 직전에 트리거됩니다.
onBeforeLightbox: (id: string | number) => boolean;
Parameters
id- (required) string | number - 작업(task) ID
Returns
result- (boolean) - 기본 이벤트 동작을 진행할지(true) 중단할지(false) 결정합니다.
Example
gantt.attachEvent("onBeforeLightbox", function(id) {
const task = gantt.getTask(id);
task.my_template = `<span id='title1'>Holders: </span>${task.users}
<span id='title2'>Progress: </span>${task.progress*100}%`;
return true;
});
Related samples
Details
- 이 이벤트는 차단할 수 있습니다. false를 반환하면 라이트박스가 열리는 것을 막습니다.
- 라이트박스가 나타나기 전에 커스텀 조정을 할 수 있는 편리한 방법입니다.