update-comment
Description
Triggered when a comment gets updated
Usage
"update-comment": ({
id?: string | number,
cardId: string | number,
comment: {
id?: string | number,
cardId?: string | number,
text?: string,
date?: Date,
html?: string
},
skipProvider?: boolean
}) => void;
Parameters
The callback for the update-comment event receives an object with these parameters:
id
- (optional) the ID of the comment being updatedcardId
- (required) the ID of the card where the comment is locatedcomment
- (required) an object with the updated comment details. It can include:id
- (optional) the updated comment's IDcardId
- (optional) the card ID where the updated comment will be addedtext
- (optional) the updated comment textdate
- (optional) the updated comment datehtml
- (optional) the updated comment's HTML markup. To show HTML instead of text, enable thehtml
property in theeditorShape
config
skipProvider
- (optional) controls whether the update request should be sent to the server or not
info
To manage internal events, you can use the Event Bus methods
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// listen for the "update-comment" event
board.api.on("update-comment", (obj) => {
console.log(obj.comment);
});
Change log: This event was introduced in v1.4