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
- Slots
-
default— Renders the tree items inside default slot.
Properties
Section titled "Properties"selection
Section titled "selection"The selection state of the tree.
selection: TreeSelection = 'none' Defined in src/components/tree/tree.ts:96
singleBranchExpand
Section titled "singleBranchExpand"Whether a single or multiple of a parent's child items can be expanded.
singleBranchExpand: boolean = false Defined in src/components/tree/tree.ts:82
toggleNodeOnClick
Section titled "toggleNodeOnClick"Whether clicking over nodes will change their expanded state or not.
toggleNodeOnClick: boolean = false Defined in src/components/tree/tree.ts:89
tagName
Section titled "tagName"The tagName read-only property of the Element interface returns the tag name of the element on which it's called.
tagName: "igc-tree" = 'igc-tree' Defined in src/components/tree/tree.ts:63
Accessors
Section titled "Accessors"items
Section titled "items"Returns all of the tree's items.
get items(): IgcTreeItemComponent[] Defined in src/components/tree/tree.ts:110
Returns IgcTreeItemComponent[]
Methods
Section titled "Methods"collapse
Section titled "collapse"Collapses all of the passed items. If no items are passed, collapses ALL items.
collapse(items: IgcTreeItemComponent[]): void Defined in src/components/tree/tree.ts:255
Parameters
- items:
IgcTreeItemComponent[]
Returns void
connectedCallback
Section titled "connectedCallback"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.
``
Typically, anything done in connectedCallback() should be undone when the
element is disconnected, in disconnectedCallback().
connectedCallback(): void Defined in src/components/tree/tree.ts:132
Returns void
deselect
Section titled "deselect"Deselect all items if the items collection is empty. Otherwise, deselect the items in the items collection.
deselect(items: IgcTreeItemComponent[]): void Defined in src/components/tree/tree.ts:229
Parameters
- items:
IgcTreeItemComponent[]
Returns void
expand
Section titled "expand"Expands all of the passed items. If no items are passed, expands ALL items.
expand(items: IgcTreeItemComponent[]): void Defined in src/components/tree/tree.ts:241
Parameters
- items:
IgcTreeItemComponent[]
Returns void
select
Section titled "select"Select all items if the items collection is empty. Otherwise, select the items in the items collection.
select(items: IgcTreeItemComponent[]): void Defined in src/components/tree/tree.ts:211
Parameters
- items:
IgcTreeItemComponent[]