Is it possible to limit icons to a particular level of a tree? For example, the common checkboxes, I only want them to show up on the children (in my use case, checking the parent is contextually incorrect).
Apparently I missed this. Here is the answer:
http://docs.webix.com/datatree__node_templates.html#predefinedtemplates
webix.ui({
view:“tree”,
template: function(obj, common){
if (obj.$level>2) {
return common.icon(obj,common)+common.folder(obj,common)+""+obj.value+"";
} else {
return common.icon(obj,common)+common.folder(obj,common)+obj.value;
}
}
});
In case anyone is trying to add ‘space’ between the icons and text, non-breaking space ’ ’ works.
I do have one open issue. It appears that when using the above method with type: “lineTree” there is a few pixel break in the tree. See the following example. Zoom in a bit if needed.
The point is that the checkbox is higher than the tree branch by one pixel
Check the following, issue can be solved through the css:
thanks