Releases: patternfly/patternfly-bootstrap-treeview
Releases · patternfly/patternfly-bootstrap-treeview
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.1.0 Release
Features
- improve rendering performance
- clone cached DOM elements instead of creating new ones from string
- when creating a new node, insert a node directly .after() previousNode instead of using .eq()
- reduce the number of addClass calls by caching base icon types
- enabled Travis build and updated badges
Bugfixes
- Fix for supporting lazy-loading when calling expandNode to programmatically expand a node's children.
- Keep the order of the nodes as specified in the JSON
- The
.sort()
call changed the order of the rendered nodes because it didn't respect the arithmetical nodeId values. This has been addressed and sorting ASCII strings like "0.0.10" and "0.0.2" works correctly now.
- The
- Fix initial rendering of partially checked nodes when hierarchal check or node state is checked
- Do not allow re-expanding of already expanded node
v2.0.0
Bootstrap Treeview V2 Release
Treeview Node Properties / API changes
- tooltip: option for tree nodes to add tooltip text on mouse hover
- image: ability to override node icons with images
- lazyLoad - adds option for lazyLoading a tree node in conjunction with lazyLoad function
- checkable: whether a node is checkable in the tree, used in conjunction with showCheckbox
- dataAttr: lists of per-node HTML
data
attributes to append - class: list of custom css classes to append, separated by space
- id: custom HTML id attributes
- hideCheckbox: used to hide the checkbox of a given node when
showCheckbox
is set totrue
Treeview Options / API Changes
- dataUrl: jQuery Ajax settings object, accepts a set of key/value pairs that configure an Ajax request
- changedNodeColor: sets the text color for a node with a changed checkbox
- checkboxFirst: swaps the node icon with the checkbox, used in conjunction with showCheckbox
- loadingIcon: sets the icon used on loadLazy node before its content gets loaded
- hierarchalCheck: whether or not to enable hierarchal checking/unchecking of checkboxes
- propagateCheckEvent: whether or not to propagate nodeChecked and nodeUnchecked events to the parent/child nodes, used in conjunction with hierarchalCheck
- highlightChanges: highlights the nodes with changed checkbox state, used in conjunction with showCheckbox
- lazyLoad: this function is called when a lazily-loadable node is being expanded for the first time
- partiallyCheckedIcon: sets the icon for a partially checked checkbox
- preventUnselect: whether or not a node can be unselected without another node first being selected
- showImage: whether or not to display a nodes image instead of the icon
- wrapNodeText: whether or not to surround the text of the node with a span tag
Methods / API Changes
Note: all methods that accept an argument nodes
will now accept either a single node or an Array of nodes
- addNode: add nodes to the tree
- addNodeAfter: add nodes to the tree after given node
- addNodeBefore: add nodes to the tree before given node
- findNodes: returns an array of matching node objects
- getChecked: returns an array of checked nodes
- getUnchecked: returns an array of unchecked nodes
- removeNode: removes given nodes from the tree
- revealNode: reveals given tree nodes, expanding the tree from node to root
- uncheckCheckboxChanges: marks all checkboxes as unchanged, removing highlighted class
- unselectNode: unselected given tree nodes
Lifecycle Events / additional events added
loading (event)
- The tree has initiated data loading.loadingFailed (event, error)
- The tree failed to load data (ajax error)initialized (event, nodes)
- The tree has initialized itself and data ready for rendering.nodeRendered (event, node)
- A new node is renderedrendered (event, nodes)
- The tree is rendereddestroyed (event)
The tree is being destroyed