onBeforeTaskMoveEvent((id, parent, tindex) => {
let droppableNode = getGanttTaskById(parent);
if (droppableNode?.type === 'task') {
removeLinks(droppableNode);
}
// eslint-disable-next-line no-console
console.log(
id,
getGanttTaskById(id).text,
getGanttTaskById(id).duration,
parent,
'here'
);
if (isVirtualRootNode(parent)) {
message.error("Can't perform this operation ");
return false;
}
return true;
});
function isVirtualRootNode(parent: string | null | number): boolean {
if (parent === null || parent == 0) return true;
return false;
}
export default isVirtualRootNode;
This event is getting called while setting baseline and scheduling the gantt. Both of them have nothing to do with task move.