Duchan
September 27, 2023, 7:17am
1
webix.ui({
view:“treetable”,
columns:[
{ template: “{common.checkbox()}”}
]
// …
})- OK
https://snippet.webix.com/p4uudk6i
webix.ui({
view:“treetable”,
columns:[
{ template: function(obj, common){return common.checkbox(obj, common)}
}]
//…
}) - ERROR
https://snippet.webix.com/08dohz0k
how to use template+function+common.checkbox
https://docs.webix.com/datatable__templates.html#complextemplates
template
receives at least 5 arguments and checkbox
uses 4th (column
) argument in addition.
try this
{ template: function(obj, common, value, column, index){return common.checkbox(obj, common, value, column)}},
or this
{ template: function(obj, common){return common.checkbox.apply(common, arguments)}},
Duchan
October 2, 2023, 3:29am
3
intregal:
function(obj, common, value, column, index) {return common.checkbox(obj, common, value, column)
thank you. everything works with 4 parameters.
P.S. In the documentation for “TreeTable”, there is a reference to " Node Templates" and there is no reference to “Cells Templates” for “DataTable”
Duchan
October 2, 2023, 5:37am
4
https://snippet.webix.com/6su01hsp
getChecked() - returns an empty array.
How to get checked?
Duchan
October 3, 2023, 2:08am
5
I’ll answer it myself:
Add
onCheck:function(id,col,state){
state?this.checkItem(id):this.uncheckItem(id)
}