onAfterTaskMove
Description
Fires after a task was moved to a new vertical position
onAfterTaskMove: (id: string | number, parent: string | number, tindex: number) => void;
Parameters
id- (required) string | number - the id of the task to moveparent- (required) string | number - the parent idtindex- (required) number - the index of the position in the parent branch that the task will be moved to
Example
// prevent moving to another sub-branch
gantt.attachEvent("onAfterTaskMove", function(id, parent, tindex){
// any custom logic here
});
Details
Note, the event fires in 2 cases:
- While calling the method moveTask
- While the option order_branch is enabled in the default mode (gantt.config.order_branch = true;) and a user drags tasks
Related API
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.