Extension of li-element that represents an object in a [[TreeList]] with a checkbox and a textinput as content. Additionally, may hold an instance of [[TreeList]] as branch to display children of the corresponding object.

Type Parameters

  • T

Hierarchy

  • HTMLLIElement
    • TreeItem

Constructors

Properties

classes: CSS_CLASS[] = []
controller: TreeController<T>
data: T = null
display: string = "TreeItem"

Accessors

  • get hasChildren(): boolean
  • Returns true, when this item has a visible checkbox in front to expand the subsequent branch

    Returns boolean

  • set hasChildren(_has): void
  • Shows or hides the checkbox for expanding the subsequent branch

    Parameters

    • _has: boolean

    Returns void

Methods

  • Tries to expanding the [[TreeList]] of children, by dispatching [[EVENT.EXPAND]]. The user of the tree needs to add an event listener to the tree in order to create that [[TreeList]] and add it as branch to this item

    Parameters

    • _expand: boolean

    Returns void

  • Dispatches the [[EVENT.SELECT]] event

    Parameters

    • _additive: boolean

      For multiple selection (+Ctrl)

    • _interval: boolean = false

      For selection over interval (+Shift)

    Returns void