DayPilot.Kanban.onCardDeleted

The onCardDeleted event handler fires after the default card delete action configured by DayPilot.Kanban.cardDeleteHandling.

Declaration

DayPilot.Kanban.onCardDeleted(args)

Parameters

  • args.card (DayPilot.Card object) - deleted card

  • args.control (DayPilot.Kanban) - control instance

Notes

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.

Examples

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.");
};

See Also

DayPilot.Kanban.onCardDelete

DayPilot.Kanban.cardDeleteHandling

DayPilot.Kanban Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript