How to detect the end of a row move session?
11 months ago.
Hello,
Objective: I am looking to perform some logic at the beginning and end of a session, but I can’t figure out how to detect when the next position is `forbidden`, given the doc says “The Scheduler control fires the onRowMove and onRowMoved events on drop (if the target position is not forbidden).”
My attempt is as followed:
-
Use `onRowMoving` to detect the beginning of a move session
onRowMoving(){
fnToCallWhenMoveStart();
const nextPosition = validateMove(...); // return `forbidden` if failed validation
args.position = nextPosition;
}
-
Use `onRowMove` to detect the end of a move session, but `fnToCallWhenMoveEnd` is not reached if user drops onto a `forbidden` position.
onRowMove(){
fnToCallWhenMoveEnd();
}
Could you provide some guidance?
DayPilot