The onCardDeleted event handler fires after the default card delete action configured by DayPilot.Kanban.cardDeleteHandling.
DayPilot.Kanban.onCardDeleted(args)args.card (DayPilot.Card object) - deleted card
args.control (DayPilot.Kanban) - control instance
When DayPilot.Kanban.cardDeleteHandling is set to "Update", the card has already been removed from the UI by the time this handler runs. Use DayPilot.Kanban.onCardDelete if you need to confirm the operation or cancel it before the card is removed.
JavaScript
const dp = new DayPilot.Kanban("dp", {
cardDeleteHandling: "Update",
onCardDeleted: (args) => {
args.control.message(args.card.data.name + " deleted.");
},
// ...
});
dp.init();Angular
<daypilot-kanban [config]="config"></daypilot-kanban>config: DayPilot.KanbanConfig = {
cardDeleteHandling: "Update",
onCardDeleted: (args) => {
args.control.message(args.card.data.name + " deleted.");
},
// ...
};React
<DayPilotKanban
cardDeleteHandling="Update"
onCardDeleted={onCardDeleted}
{/* ... */}
/>const onCardDeleted = (args) => {
args.control.message(args.card.data.name + " deleted.");
};Vue
<DayPilotKanban
cardDeleteHandling="Update"
@cardDeleted="onCardDeleted"
<!-- ... -->
/>const onCardDeleted = (args) => {
args.control.message(args.card.data.name + " deleted.");
};