Skip to main content

update-card

Description

Fires when updating card data

Usage

"update-card": ({
id: string | number,
card?: object,
replace?: boolean,
skipProvider?: boolean
}) => void;

Parameters

The callback of the update-card event can take an object with the following parameters:

  • id - (required) the ID of the card to be updated

  • card - (optional) the new data object of the card. The full list of the card parameters can be found here

  • replace - (optional) enables/disables fully data replacing

    note

    If you set the replace parameter to true, the old data will be fully replaced by the new ones. Otherwise, the method will update only the values you passed.

  • skipProvider - (optional) enables/disables preventing the request from being sent to the server

info

For handling the inner events you can use the Event Bus methods

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// subscribe on the "update-card" event
board.api.on("update-card", (obj) => {
console.log(obj);
});

Change log:

  • The id and card parameters were added in v1.1
  • The replace parameter was added in v1.3