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.
Declaration
DayPilot.Kanban.onSwimlaneMove(args)Parameters
args.control(DayPilot.Kanban) - control instanceargs.swimlane(object) - the swim lane being movedargs.position(number) - target position indexargs.previous(object) - swim lane preceding the target positionargs.next(object) - swim lane following the target positionargs.preventDefault()- cancels the default action
Notes
The source data object is accessible as args.swimlane.data.
Examples
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();
}
};See Also
DayPilot.Kanban.swimlaneMoveHandling
DayPilot.Kanban.onSwimlaneMoved
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot