The onSwimlaneMove event handler fires when swim lane moving is finished, after the swim lane is dropped at the target position but before the swim lane is actually moved. You can cancel the move at this stage.
DayPilot.Kanban.onSwimlaneMove(args)args.control (DayPilot.Kanban) - control instance
args.swimlane (object) - the swim lane being moved
args.position (number) - target position index
args.previous (object) - swim lane preceding the target position
args.next (object) - swim lane following the target position
args.preventDefault() - cancels the default action
The source data object is accessible as args.swimlane.data.
JavaScript
const kanban = new DayPilot.Kanban("dp", {
swimlaneMoveHandling: "Update",
onSwimlaneMove: (args) => {
if (!confirm("Do you really want to move this swimlane?")) {
args.preventDefault();
}
},
// ...
});
kanban.init();Angular
<daypilot-kanban [config]="config"></daypilot-kanban>config: DayPilot.KanbanConfig = {
swimlaneMoveHandling: "Update",
onSwimlaneMove: (args) => {
if (!confirm("Do you really want to move this swimlane?")) {
args.preventDefault();
}
},
// ...
};React
<DayPilotKanban
swimlaneMoveHandling="Update"
onSwimlaneMove={onSwimlaneMove}
{/* ... */}
/>const onSwimlaneMove = (args) => {
if (!confirm("Do you really want to move this swimlane?")) {
args.preventDefault();
}
};Vue
<DayPilotKanban
swimlaneMoveHandling="Update"
@swimlaneMove="onSwimlaneMove"
<!-- ... -->
/>const onSwimlaneMove = (args) => {
if (!confirm("Do you really want to move this swimlane?")) {
args.preventDefault();
}
};DayPilot.Kanban.swimlaneMoveHandling