type

an object that specifies items presentation

object|string type;

Example

list = webix.ui({
    view:"tree",
    ...
    type:{
        template:"{common.icon()} {common.folder()}<span>#value#</span>",
    }
})

Related samples

Details

Attributes of the type as object:

  • css - (string) the name of a css class that will be applied to component items (the default name of the applied class is 'default').
  • template - (function, string) an html template that will define item presentation in the component.

Built-in named types:

  • lineTree - adds vertical lines to the tree presentation.
webix.ui({
    view:"tree",
    type:"lineTree"
});

Related sample:  (Tree) Lines

Built-in type methods

The following methods are used in the tree template:

  • space
  • icon
  • checkbox
  • folder
webix.ui({
   view:"tree", 
   template:"{common.icon()} {common.checkbox()} {common.folder()}"+
        "<span>#value#</span>", 
});

Related sample:  2-state Checkboxes

More information on this topic can be found in the dedicated documentation article.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript website framework and page of tree ui product.