Hi.
I’m tring to add multiple icon buttons in a data table column using different suggestions and articles on your web page. But i can seem to be able to render more then the first button defined in the actions column.
Note: I’m using Typescript.
webix.ui({
id: "mainLayout",
type: "space",
rows: [
{ template: "headerRow", height: 50 },
{
cols: [
{ id: "treeColumn", template: "tree", gravity: 1 },
{ view: "resizer" },
{
id: "gridColumn", template: "grid", gravity: 6, autowidth: true,
rows: [
{
view: "activetable", id: "mygrid", rowHeight: 40, select: "row",
columns: [
{ id: "name", header: "Name" },
{ id: "description", header: "Description", fillspace: true },
{ id: "assignedTX", width: 350, header: "Assigned TX" },
{
id: "actions", width: 250, template:
"<div class='buttons'>{common.actionButton()}</div>" +
"<div class='buttons'>{common.actionButton2()}</div>"
}
],
activeContent: {
actionButton: {
view: "button",
type: "icon",
icon: "fa fa-power-off",
width: 40, css: {
"line-height": "34px"
},
click: function (id: any, e: any) {
var item_id = this.config.$masterId.row;
webix.message("Click on " + item_id);
}
},
actionButton2: {
view: "button",
type: "icon",
icon: "fa fa-plug",
width: 40, css: {
"line-height": "34px"
},
click: function (id: any, e: any) {
var item_id = this.config.$masterId.row;
webix.message("Click on " + item_id);
}
}
},
}
]
}
]
},
{ template: "footerRow", height: 50 },
]
});
$.getJSON("eq.json", (data: any) => {
let dt: webix.ui.datatable = $$("mygrid") as webix.ui.datatable;
dt.add({
id: "receiver:1",
name: "INT-RX01",
description: "some description",
assignedTX: "INT-TX06"
});
dt.add({
id: "receiver:2",
name: "INT-RX02",
description: "some other description",
assignedTX: "INT-TX11"
});
});
}
}
`