Skip to main content

TreeViewGroup

Tree view node. Sample: https://public.datagrok.ai/js/samples/ui/tree-view

Extends

Constructors

new TreeViewGroup()

new TreeViewGroup(dart): TreeViewGroup

Parameters

ParameterType
dartany

Returns

TreeViewGroup

Inherited from

TreeViewNode . constructor

Constructs

from the Dart object

Source

src/widgets.ts:1687

Properties

PropertyTypeInherited from
dartanyTreeViewNode.dart

Accessors

autoCheckChildren

get autoCheckChildren(): boolean

Indicates whether check or uncheck is applied to a node only or to all node's children

set autoCheckChildren(auto): void

Parameters

ParameterType
autoboolean

Returns

boolean

Source

src/widgets.ts:1807


captionLabel

get captionLabel(): HTMLElement

Caption label

Returns

HTMLElement

Source

src/widgets.ts:1709


checkBox

get checkBox(): null | HTMLElement

Check box element

Returns

null | HTMLElement

Source

src/widgets.ts:1714


checked

get checked(): boolean

Returns true if checked

set checked(checked): void

Parameters

ParameterType
checkedboolean

Returns

boolean

Source

src/widgets.ts:1719


children

get children(): TreeViewNode<any>[]

Gets the node's children

Returns

TreeViewNode<any>[]

Source

src/widgets.ts:1798


currentItem

get currentItem(): TreeViewNode<any>

set currentItem(node): void

Parameters

ParameterType
nodeTreeViewNode<any>

Returns

TreeViewNode<any>

Source

src/widgets.ts:1810


expanded

get expanded(): boolean

set expanded(isExpanded): void

Parameters

ParameterType
isExpandedboolean

Returns

boolean

Source

src/widgets.ts:1802


items

get items(): TreeViewNode<any>[]

Gets all node items

Returns

TreeViewNode<any>[]

Source

src/widgets.ts:1793


onChildNodeExpandedChanged

get onChildNodeExpandedChanged(): Observable <TreeViewGroup>

Returns

Observable <TreeViewGroup>

Source

src/widgets.ts:1834


onChildNodeExpanding

get onChildNodeExpanding(): Observable <TreeViewGroup>

Returns

Observable <TreeViewGroup>

Source

src/widgets.ts:1836


onNodeAdded

get onNodeAdded(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1830


onNodeCheckBoxToggled

get onNodeCheckBoxToggled(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1832


onNodeContextMenu

get onNodeContextMenu(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1839


onNodeEnter

get onNodeEnter(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1847


onNodeExpanding

get onNodeExpanding(): Observable <TreeViewGroup>

Returns

Observable <TreeViewGroup>

Source

src/widgets.ts:1828


onNodeMouseEnter

get onNodeMouseEnter(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1843


onNodeMouseLeave

get onNodeMouseLeave(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1845


onSelected

get onSelected(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1739


onSelectedNodeChanged

get onSelectedNodeChanged(): Observable <TreeViewNode<any>>

Returns

Observable <TreeViewNode<any>>

Source

src/widgets.ts:1841


parent

get parent(): TreeViewNode<any>

Returns

TreeViewNode<any>

Source

src/widgets.ts:1704


root

get root(): HTMLElement

Visual root

Returns

HTMLElement

Source

src/widgets.ts:1692


rootNode

get rootNode(): TreeViewGroup

Returns

TreeViewGroup

Source

src/widgets.ts:1696


tag

get tag(): any

set tag(t): void

Parameters

ParameterType
tany

Returns

any

Source

src/widgets.ts:1726


text

get text(): string

Node text

set text(value): void

Parameters

ParameterType
valuestring

Returns

string

Source

src/widgets.ts:1723


value

get value(): T

Node value

set value(v): void

Parameters

ParameterType
vT

Returns

T

Source

src/widgets.ts:1730

Methods

enableCheckBox()

enableCheckBox(checked): void

Enables checkbox

Parameters

ParameterTypeDefault value
checkedbooleanfalse

Returns

void

Inherited from

TreeViewNode . enableCheckBox

Source

src/widgets.ts:1734


getOrCreateGroup()

getOrCreateGroup(text, value, expanded): TreeViewGroup

Returns existing, or creates a new node group

Parameters

ParameterTypeDefault value
textstringundefined
valuenull | objectnull
expandedbooleantrue

Returns

TreeViewGroup

Source

src/widgets.ts:1819


group()

group(text, value, expanded, index): TreeViewGroup

Adds new group

Parameters

ParameterTypeDefault value
textstring | Elementundefined
valuenull | objectnull
expandedbooleantrue
indexnull | numbernull

Returns

TreeViewGroup

Source

src/widgets.ts:1814


item()

item(text, value): TreeViewNode<any>

Adds new item to group

Parameters

ParameterTypeDefault value
textstring | Elementundefined
valuenull | objectnull

Returns

TreeViewNode<any>

Source

src/widgets.ts:1824


loadSources()

loadSources(source): Promise<void>

Parameters

ParameterType
sourceHttpDataSource<any>

Returns

Promise<void>

Source

src/widgets.ts:1849


remove()

remove(): void

Removes the node and its children from the parent

Returns

void

Inherited from

TreeViewNode . remove

Source

src/widgets.ts:1742


fromItemCategories()

static fromItemCategories(items, props, options?): TreeViewGroup

Parameters

ParameterType
itemsany[]
propsstring[]
options?object
options.itemToElement?(item) => Element
options.itemToString?(item) => string
options.itemToValue?(item) => any
options.removeEmpty?boolean

Returns

TreeViewGroup

Source

src/widgets.ts:1753


tree()

static tree(): TreeViewGroup

Creates new tree

Returns

TreeViewGroup

Source

src/widgets.ts:1749