abstract class domkit::TreeNode

sys::Obj
  domkit::TreeNode

@Js

Source

TreeNode models a node in a Tree.

See also: docDomkit

children

virtual TreeNode[] children()

Source

Get the children of this node. If no children return an empty list. Default behavior is no children. This method must return the same instances when called.

hasChildren

virtual Bool hasChildren()

Source

Return true if this has or might have children. This is an optimization to display an expansion control without actually loading all the children. The default returns !children.isEmpty.

isExpanded

Bool isExpanded()

Source

Is this node expanded?

onElem

abstract Void onElem(Elem elem, TreeFlags flags)

Source

Callback to customize Elem for this node.

parent

TreeNode? parent { internal set }

Source

Parent node of this node, or null if this node is a root.