That makes sense.
The use case is we want to collapse all the siblings of the (single) row being moved when the move session starts.
const activeMovedRowIdRef = useRef(null);
onRowMoving(args){
if(!activeMovedRowIdRef.current) {
activeMovedRowIdRef.current = args.row.id();
collapseSibling(args.row.id);
}
}
onRowMoveEnd(args){
activeMovedRowIdRef.current = null;
// do something
}
When the move ends (regardless of drop position, invalid or not), we want to reset `activeMovedRowIdRef` to null.
Problem: If user drops resource invalidly outside of scheduler, `onRowMoveEnd` will not be called, meaning the active row id is not reset and `collapseSibling` won’t be called again.
Note that after the first invalid drop, user can have expand some siblings before initiating the drag of the same row again.