You can add any user-defined handler to any of the available events. To do this, you can use the attachEvent method with the following parameters:
$$("myBoard").attachEvent(evName, evHandler);
Several handlers can be attached to one and the same event, and all of them will be executed. The names of the events are case-insensitive.
Event handlers can also be attached with the on property:
webix.ui({
view:"kanban",
on:{
onListIconClick: function(iconId, itemId){
webix.message("Icon click in '"+this.getItem(itemId).text+"' item");
}
},
cols:[
{ header:"Backlog", body:{ view:"kanbanlist", status:"new", type: "icons" }},
{ header:"In Progress", body:{ view:"kanbanlist", status:"work", type: "icons" }}
],
url:"./data/tasks"
});
There is a simple way of removing an event-handler:
$$("myBoard").detachEvent(id); // the unique ID of the event handler
You can find the full list of supported events in the Kanban Board API Reference.
Back to top