Skip to main content

add-vote

Description

Triggered when a user casts a new vote

Usage

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

Parameters

The callback for the add-vote event receives an object with these properties:

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

To manage internal events, you can use the Event Bus methods

Example

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

Change log: The event was added in v1.4