Documentation

type

object that specifies items presentation

object| string type;

Example

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

See also

Details

Attributes of the type as object:

  • css - (string) the name of a css class that will be applied to component's 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:  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.

Back to top