Class IgcTreeComponent

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

  • Renders the tree items inside default 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.

Hierarchy

Hierarchy

  • SizableInterface<this> & EventEmitterInterface<IgcTreeEventMap, this> & LitElement<this>
    • IgcTreeComponent

Constructors

Properties

selection: "none" | "multiple" | "cascade" = 'none'

The selection state of the tree.

Attr

singleBranchExpand: boolean = false

Whether a single or multiple of a parent's child items can be expanded.

Attr

single-branch-expand

size: "small" | "medium" | "large"

Determines the size of the component.

Attr

Deprecated

since v4.5.0. Use the --ig-size CSS custom property instead.

toggleNodeOnClick: boolean = false

Whether clicking over nodes will change their expanded state or not.

Attr

toggle-node-on-click

styles: CSSResult = styles
tagName: "igc-tree" = 'igc-tree'

Accessors

Methods

  • Returns void

  • Type parameters

    Type Parameters

    Parameters

    • type: K
    • Optional eventInitDict: CustomEventInit<D>

    Returns boolean