Back to Trilium

Interface NodeData

docs/Script API/interfaces/Frontend_Script_API._internal_.NodeData.html

0.102.23.9 KB
Original Source

Interface NodeData

Data object passed to FancytreeNode() constructor. Note: typically these attributes are accessed by meber methods, e.g. node.isExpanded() and node.setSelected(false).

interface NodeData {
active?: boolean;
children?: NodeData[];
data?: Object;
expanded?: boolean;
extraClasses?: string;
focus?: boolean;
folder?: boolean;
hideCheckbox?: boolean;
icon?: string | boolean;
iconTooltip?: string;
key?: string;
lazy?: boolean;
refKey?: string;
selected?: boolean;
statusNodeType?: string;
title: string;
tooltip?: string;
type?: string;
unselectable?: boolean;
unselectableIgnore?: boolean;
unselectableStatus?: boolean;
}

Index

Properties

active?children?data?expanded?extraClasses?focus?folder?hideCheckbox?icon?iconTooltip?key?lazy?refKey?selected?statusNodeType?titletooltip?type?unselectable?unselectableIgnore?unselectableStatus?

Properties

Optionalactive

active?: boolean

(initialization only, but will not be stored with the node).

Optionalchildren

children?: NodeData[]

optional array of child nodes

Optionaldata

data?: Object

all properties from will be copied to node.data

Optionalexpanded

expanded?: boolean

OptionalextraClasses

extraClasses?: string

class names added to the node markup (separate with space)

Optionalfocus

focus?: boolean

(initialization only, but will not be stored with the node).

Optionalfolder

folder?: boolean

OptionalhideCheckbox

hideCheckbox?: boolean

Optionalicon

icon?: string | boolean

OptionaliconTooltip

iconTooltip?: string

Will be added as title attribute of the node's icon span,thus enabling a tooltip.

Optionalkey

key?: string

unique key for this node (auto-generated if omitted)

Optionallazy

lazy?: boolean

OptionalrefKey

refKey?: string

(reserved)

Optionalselected

selected?: boolean

OptionalstatusNodeType

statusNodeType?: string

If set, make this node a status node. Values: 'error', 'loading', 'nodata', 'paging'.

title

title: string

node text (may contain HTML tags)

Optionaltooltip

tooltip?: string

Optionaltype

type?: string

Made available as node.type.

Optionalunselectable

unselectable?: boolean

OptionalunselectableIgnore

unselectableIgnore?: boolean

Ignore this node when calculating the partsel status of parent nodes in selectMode 3 propagation.

OptionalunselectableStatus

unselectableStatus?: boolean

Use this as constant selected value(overriding selectMode 3 propagation).

Settings

Member Visibility

  • Protected
  • Inherited
  • External

ThemeOSLightDark

On This Page

Properties activechildrendataexpandedextraClassesfocusfolderhideCheckboxiconiconTooltipkeylazyrefKeyselectedstatusNodeTypetitletooltiptypeunselectableunselectableIgnoreunselectableStatus