Monday, September 23, 2013

Angular treeview directive 0.5v (ui.treeview 0.5v).

Hi,

With this post, the new treeview directive version changes(ui.treeview.js v0.5) will be explained. The new plugin can be downloaded from this link.

The first and foremost change is in the implementation of search functionality of the treeview.

I noticed that using the default angular's filter is not suitable for the control like treeview. Hence with this release there's new custom filter in place which will be upgraded in coming versions.

Here's list of options and their usage description of this version.

AttributesDataTypeDescription
treeview-data (Required)Array (Binding)bind the data variable from your controller for which you wish to display treeview.
unique-id (Optional)Stringoptional attribute for now. Bind the attribute which is unique for the node.
display-attr (Required)String bind the attribute of the data which has to be displayed at each node.
data-check (Optional)booleanAttribute to specify whether to display check box for the nodes or not. Default is false.
data-check-rec (Optional)booleanAttribute to specify whether to select all children nodes on selection of a single node. Default is true.
expand-all (Optional)booleanAttribute to specify whether the tree should be expanded or not. Default is collapse
searchModel (Optional)String (Binding)Attribute for searching tree.

Check out the plugin and please leave your comments for improving this.

Happy Coding.

No comments:

Post a Comment