Skip to main content

add-vote

Description

Triggered whenever a user adds a new vote

Usage

"add-vote": ({
cardId: string | number,
skipProvider?: boolean
}) => void;

Parameters

The callback for the add-vote event receives an object containing the following properties:

  • cardId - (required) the ID of the card where the vote is being added
  • skipProvider - (optional) controls whether the request to the server is skipped or not
info

To work with internal events, you can refer to the Event Bus methods

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// listen for the "add-vote" event
board.api.on("add-vote", (obj) => {
console.log(obj.cardId);
});

Change log: This event was introduced in v1.4