The selection state of the tree.
Whether a single or multiple of a parent's child items can be expanded.
Whether clicking over nodes will change their expanded state or not.
Static
Readonly
tagReturns the HTML-uppercased qualified name.
Returns all of the tree's items.
Collapses all of the passed items. If no items are passed, collapses ALL items.
Deselect all items if the items collection is empty. Otherwise, deselect the items in the items collection.
Expands all of the passed items. If no items are passed, expands ALL items.
Select all items if the items collection is empty. Otherwise, select the items in the items collection.
Invoked when the component is added to the document's DOM.
In connectedCallback()
you should setup tasks that should only occur when
the element is connected to the document. The most common of these is
adding event listeners to nodes external to the element, like a keydown
event handler added to the window.
connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}
Typically, anything done in connectedCallback()
should be undone when the
element is disconnected, in disconnectedCallback()
.
The tree allows users to represent hierarchical data in a tree-view structure, maintaining parent-child relationships, as well as to define static tree-view structure without a corresponding data model.
Element
igc-tree
Slot
Fires
igcSelection - Emitted when item selection is changing, before the selection completes.
Fires
igcItemCollapsed - Emitted when tree item is collapsed.
Fires
igcItemCollapsing - Emitted when tree item is about to collapse.
Fires
igcItemExpanded - Emitted when tree item is expanded.
Fires
igcItemExpanding - Emitted when tree item is about to expand.
Fires
igcItemActivated - Emitted when the tree's
active
item changes.