onBeforeSplitTaskDisplay
Description
Fires before a part of the split task is displayed on the Gantt chart
onBeforeSplitTaskDisplay: (id: number | string, task: Task, parent: any) => boolean;
Parameters
id- (required) number | string - the id of the subtasktask- (required) Task - the object of the subtaskparent- (required) object - the object of the parent task
Returns
result- (boolean) - defines whether the subtask of the split task will be displayed on the page (true) or not (false)
Example
gantt.attachEvent("onBeforeSplitTaskDisplay", function (id, task, parent) {
if (task.duration < 3) {
return false;
}
return true;
});
Details

When the split task is rendered, firstly the onBeforeTaskDisplay event is fired for the parent item (a task with render:"split"). Then "onBeforeSplitTaskDisplay" is fired for its every subtask. Returning false from "onBeforeSplitTaskDisplay" prevents a subtask from being displayed.
note
sample: Filter split tasks
Related Guides
Change log
- added in v8.0