abstract class domkit::TreeNode

sys::Obj
  domkit::TreeNode

@Js

TreeNode models a node in a Tree.

See also: docDomkit

children

virtual TreeNode[] children()

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()

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()

Is this node expanded?

onElem

abstract Void onElem(Elem elem, TreeFlags flags)

Callback to customize Elem for this node.

parent

TreeNode? parent { internal set }

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