The onCardMoved event handler fires when the user finishes moving a card and the card has already been moved to the target position.
Declaration
DayPilot.Kanban.onCardMoved(args)Parameters
args.card(DayPilot.Card object) - moved cardargs.column(DayPilot.Column object) - target columnargs.control(DayPilot.Kanban) - control instanceargs.position(integer) - position inside the destination cellargs.previous(DayPilot.Card object) - card preceding the target positionargs.next(DayPilot.Card object) - card following the target positionargs.swimlane(DayPilot.Swimlane object) - target swimlane
Notes
This handler runs after the default drop action configured by DayPilot.Kanban.cardMoveHandling updates the card location. Use DayPilot.Kanban.onCardMove if you need to validate or cancel the move before it is applied.
The source data object is accessible as args.card.data.
Examples
JavaScript
const dp = new DayPilot.Kanban("dp", {
cardMoveHandling: "Update",
onCardMoved: (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
},
// ...
});
dp.init();Angular
<daypilot-kanban [config]="config"></daypilot-kanban>config: DayPilot.KanbanConfig = {
cardMoveHandling: "Update",
onCardMoved: (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
},
// ...
};React
<DayPilotKanban
cardMoveHandling="Update"
onCardMoved={onCardMoved}
{/* ... */}
/>const onCardMoved = (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
};Vue
<DayPilotKanban
cardMoveHandling="Update"
@cardMoved="onCardMoved"
<!-- ... -->
/>const onCardMoved = (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
};See Also
DayPilot.Kanban.cardMoveHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot