Class IgcTreeItemComponent

The tree-item component represents a child item of the tree component or another tree item.

element

igc-tree-item

slot
  • Renders nested tree-item component.
slot

label - Renders the tree item container.

slot

indicator - Renders the expand indicator container.

slot

loading - Renders the tree item loading indicator container.

slot

indentation - Renders the container (by default the space) before the tree item.

csspart

wrapper - The wrapper for the tree item.

csspart

selected - Indicates selected state. Applies to wrapper.

csspart

focused - Indicates focused state. Applies to wrapper.

csspart

active - Indicates an active state. Applies to wrapper.

csspart

indicator - The expand indicator of the tree item.

csspart

label - The tree item content.

csspart

text - The tree item displayed text.

csspart

select - The checkbox of the tree item when selection is enabled.

Hierarchy

  • LitElement
    • IgcTreeItemComponent

Index

Constructors

  • Returns IgcTreeItemComponent

Properties

active: boolean = false

Marks the item as the tree's active item.

disabled: boolean = false

Get/Set whether the tree item is disabled. Disabled items are ignored for user interactions.

expanded: boolean = false

The tree item expansion state.

label: string = ''

The tree item label.

level: number = 0

The depth of the item, relative to the root.

loading: boolean = false

To be used for load-on-demand scenarios in order to specify whether the item is loading data.

parent: null | IgcTreeItemComponent = null

The parent item of the current tree item (if any)

selected: boolean = false

The tree item selection state.

A reference to the tree the item is a part of.

value: any = undefined

The value entry that the tree item is visualizing. Required for searching through items.

Accessors

Methods

  • collapse(): void
  • connectedCallback(): void
  • disconnectedCallback(): void
  • expand(): void
  • Returns a collection of child items. If the parameter value is true returns all tree item's direct children, otherwise - only the direct children.

    Parameters

    • options: { flatten: boolean } = ...
      • flatten: boolean

    Returns IgcTreeItemComponent[]

  • toggle(): void