Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ITreeNode

Hierarchy

  • ITreeNode

Index

Properties

children

children: ITreeNode[]

The children of the node. By default is determined by 'node.data.children', unless stated otherwise in the options

data

data: any

Pointer to the original data.

displayField

displayField: string

The value of the node's field that is used for displaying its content. By default 'name', unless stated otherwise in the options

elementRef

elementRef: any

Pointer to the ElementRef of the TreeNodeComponent that's displaying this node

hasChildren

hasChildren: boolean

id

id: IDType

A unique key of this node among its siblings. By default it's the 'id' of the original node, unless stated otherwise in options.idField

index

index: number

index of the node inside its parent's children

isActive

isActive: boolean

isCollapsed

isCollapsed: boolean

isExpanded

isExpanded: boolean

isFocused

isFocused: boolean

isLeaf

isLeaf: boolean

isRoot

isRoot: boolean

level

level: number

Level in the tree (starts from 1).

parent

parent: ITreeNode

Parent node

path

path: string[]

Path in the tree: Array of IDs.

Methods

blur

  • blur(): any
  • Blur (unfocus) the node

    Returns any

collapse

  • collapse(): any
  • Collapses the node

    Returns any

collapseAll

  • collapseAll(): any
  • collapse all nodes under this one

    Returns any

doForAll

  • doForAll(fn: function): any
  • Invokes a method for every node under this one - depth first

    Parameters

    • fn: function

      a function that receives the node

    Returns any

ensureVisible

  • ensureVisible(): any
  • Expands all ancestors of the node

    Returns any

expand

  • expand(): any
  • Expands the node

    Returns any

expandAll

  • expandAll(): any
  • expand all nodes under this one

    Returns any

findNextNode

  • Finds the visually next node in the tree.

    Parameters

    • goInside: boolean

      whether to look for children or just siblings

    Returns ITreeNode

    next node.

findNextSibling

  • findNextSibling(skipHidden: any): ITreeNode
  • Parameters

    • skipHidden: any

      whether to skip hidden nodes

    Returns ITreeNode

    next sibling (or null)

findPreviousNode

  • findPreviousNode(skipHidden: any): ITreeNode
  • Finds the visually previous node in the tree.

    Parameters

    • skipHidden: any

      whether to skip hidden nodes

    Returns ITreeNode

    previous node.

findPreviousSibling

  • findPreviousSibling(skipHidden: any): ITreeNode
  • Parameters

    • skipHidden: any

      whether to skip hidden nodes

    Returns ITreeNode

    previous sibling (or null)

fireEvent

  • fireEvent(event: any): any
  • Fire an event to the renderer of the tree (if it was registered)

    Parameters

    • event: any

    Returns any

focus

  • focus(): any
  • Focus on the node

    Returns any

getClass

  • getClass(): string
  • Returns string

    in case nodeClass option is supplied, returns the current node's class

getFirstChild

  • Parameters

    • skipHidden: any

      whether to skip hidden nodes

    Returns ITreeNode

    first child (or null)

getLastChild

  • Parameters

    • skipHidden: any

      whether to skip hidden nodes

    Returns ITreeNode

    last child (or null)

getNodePadding

  • getNodePadding(): string
  • Returns string

    in case levelPadding option is supplied, returns the current node's padding

hide

  • hide(): any
  • Hides the node

    Returns any

isDescendantOf

  • Parameters

    Returns boolean

    true if this node is a descendant of the parameter node

scrollIntoView

  • scrollIntoView(): any
  • Scroll the screen to make the node visible

    Returns any

setActiveAndVisible

  • setActiveAndVisible(multi: boolean): any
  • sets the node to be active and makes sure it's visible by expanding all nodes above it and scrolling it into view. Very similar to calling activate, ensureVisible and scrollIntoView methods. If multi is true (default false) - does a multiselect.

    Parameters

    • multi: boolean

    Returns any

setIsActive

  • setIsActive(value: boolean, multi?: boolean): any
  • sets the node to active / inactive according to the value. If multi is true (default false) - does a multiselect.

    Parameters

    • value: boolean
    • Optional multi: boolean

    Returns any

setIsHidden

  • setIsHidden(value: boolean): any
  • Parameters

    • value: boolean

      if true makes the node hidden, otherwise visible

    Returns any

show

  • show(): any
  • Makes the node visible

    Returns any

toggleActivated

  • toggleActivated(multi: any): any
  • Activates / Deactivates the node (selects / deselects)

    Parameters

    • multi: any

    Returns any

toggleExpanded

  • toggleExpanded(): any
  • Expands / Collapses the node

    Returns any

Generated using TypeDoc