-
Notifications
You must be signed in to change notification settings - Fork 0
PublicApi
When Pioneer Tree initializes, it expands the functionality of each node in your tree. By way of, you will have access to this expanded functionality through the public api exposed by Pioneer Tree.
To access tree level operations, you need to to add a reference variable to your pioneer-tree component.
For example, you can add #pt like so.
<ul pioneer-tree [configuration]="configuration" [nodes]="nodes" #pt>Inside your parent component, of which houses pioneer-tree, grab a reference to your @ViewChild.
@ViewChild('pt')
pt: ViewChild : PioneerTreeComponent;Expands all nodes in your tree.
Collapses all nodes in your tree. You can optional supply a depth parameter to tell pioneer tree to collapse everything up to a certain depth in the tree.
- Ability to specify the depth you want the
collapseAllNodes()function to collapse to.
const depth = 1;
this.pt.ptree.collapseAllNodes(depth);- Collapses all nodes.
- Expands expands the node passed in and all parents up to root level.
- Sets the node to the current tracked and active node.
Returns your tree minus all expanded functionality.
Returns your tree with all expanded functionality
The pioneerTreeNode object is tacked onto your node and can be access by the dot operator like so.
node.pioneerTreeNodeDetermine if the node is current in a collapsed state. In a common context, collapsed means that the node's children are not viewable.