UNPKG

pragma-views2

Version:

31 lines (22 loc) 1.22 kB
# Pragma Column View This is a custom web component that is used to represent hierarchy and should inherit from HierarchyBase. A example of a column view can be seen here: http://cdn.osxdaily.com/wp-content/uploads/2010/03/set-column-view-size-default-mac-os-x-finder.jpg In it's basic form a column view is just a number of list views side by side. Instead of expanding a UL / LI pair as you would in a tree view, each time you expand a item a new column is added to the right populated with the child items. Each column should conform to a standard list view and act as a seperate list/ This will allow individual columns to overflow normally with out affecting each other. # Usage Standard usage could look like this. ```html <pragma-column-view> <template> <div>#item.code</div> </template> </pragma-column-view> ``` See the pragma-list documentation as it applies here too. The only difference is that though you have one template that defines the leaf item structure, this counts for each column. It may make sense to use a pragma-list for each column. When collapsing the branch the columns to the right must be removed. Be careful of memory leaks here.