Create a new TreeViewNode
The treeview this node belongs to
The elements of badges on this treeview
The element representing the checkbox on this element
The dom element representing this node
The element representing the (user definable) icon on this element
The expand icon displayed on a given node, typically to the left of the text. (Optional)
The element representing the image description of this element
The elements used to build the node level indentation
The span in which the text of this node is contained
The index of this entry in the parent's children array.
The hierarchy level this node is at.
The internal node ID. This is used to identify the node in the treeview via its path
The options of the treeview this node belongs to
The parent of this node if it is existing
Whether this node is marked as a search result or not
The treeview this node belongs to
The background color used on a given node, overrides global color option. (Optional)
Whether a node is checkable in the tree, used in conjunction with showCheckbox. Default true
List of custom CSS classes to append, separated by space.
The foreground color used on a given node, overrides global color option. (Optional)
List of per-node HTML data- attributes to append.
Used to hide the checkbox of the given node when showCheckbox is set to true
The icon displayed on a given node, typically to the left of the text. (Optional)
The color used under a given node's background icon. (Optional)
The color used on a given node's icon. (Optional)
Custom HTML id attribute
The URL to an image displayed on a given node, overrides the icon. (Optional)
Adds an expand icon to the node even if it has no children, it calls the lazyLoad() function (described below) upon the first expand. Default: false (Optional)
Whether a node is selectable in the tree. False indicates the node should act as an expansion heading and will not fire selection events. Default true
The icon displayed on a given node when selected, typically to the left of the text. (Optional)
The current state of this node. See @BSTreeViewNodeState for more details
Used in conjunction with global showTags option to add additional information to the right of each node; using Bootstrap Badges, A tag can be an object with properties 'text' for tag value and 'class' for class names(s) of this tag
Sets the class of node tags. Default null
The text value displayed for a given tree node, typically to the right of the nodes icon. (Mandatory)
The tooltip value displayed for a given tree node on mouse hover. (Optional)
Returns the nodeID of the parent node Returns null, if this element has no parent
This function creates the _domCheckbox element and add it to the dom if a checkbox should be shown
This function creates the _domIcon element and add it to the dom if an icon should be shown
This function creates the _domImage element and add it to the dom if an image should be shown
Perform the lazy load on this node, using the lazyLoad function if present
Recursively removes this node and all its children from the Dom
Creates the underlying HTMLElement for this node and updates its properties.
Recursively set the aria-owns attribute of this element to make the hierarchy accessible This is only possible after the tree is rendered
Sets whether this node is a highlighted as search result or not.
Changes the visibility state of this node. Mostly useful for internal use
Create the given event on the nodes element. The event bubbles the DOM upwards. Details about the node and the used treeView are passed via event.detail
The name of the event to generate (see EVENT_* constants in BSTreeViewEventNames)
Update the children nodes for hierarchy, by setting the right values for parent, level and index. All children nodes are registered then at the treeview. Beware that this node itself is not registered! Also, hierarchically dependent node properties are set here. This function is called recursively.
Returns the children of this node
Returns the number of children of this node
Returns the level of this node in the treeview Please note that the value is only correct after the nodes have been rendered
Returns the parent node of this node, or null if no parent exists
The treeview this node belongs to
Returns true, if this node has children.
Returns true, if this node is a child node, meaning it has a parent node. False otherwise.
Returns true, if this node is an end node, meaning it has no child nodes. False otherwise.
Returns true, if this node is a root node (meaning it has no parent). False otherwise.
Sets the checked state of this node
Sets the disabled state of this node
true to disable, false to enable
Sets the expanded state of this node.
True, if the node should be expanded, false to collapse it.
Sets the selected state of this node
The new state of the node
Toggle the checked state of this node
Toggle the disabled state of this node
Toggle the expanded state of this node (if it was expanded, it will be collapsed, and vice versa)
Toggle the selected state of this node
Create a new node object from partial data object, containing the properties which should be set on the node. This function creates the children nodes objects from the data object recursively.
An object with the properties which should be set on the node.
The treeview this node belongs to
Generated using TypeDoc
This class describes a node of an BSTreeView