Tree

Tree — $treeData

<base-tree>

A mat-tree wrapper driven by node.children — no flat-node plumbing. Nodes need only an id and a label; disabled is styling only.

A plain tree: the garage is disabled — half opacity, no clicks, still in the data.

Kitchen
Bathroom
Exterior
Garage (next year)

Expand all — expandAll / collapseAll

<base-tree>

Public methods on the component. base-tree never renders a control for them, so you need a viewChild — tree-fields’ own expandAllButton() is dead code.

The buttons open or close every branch at once.

Kitchen
Bathroom
Exterior
Garage (next year)

Initial state — $onToggle

<base-tree>

node.expanded is ignored unless $onToggle is also bound — the seeding effect returns early without it.

Saturday and its morning start open, and every open or close is reported below.

Saturday
Morning
Hardware store run
Prime the hallway
Afternoon
Sunday

Content template — $contentTemplate

<base-tree>

Replaces the whole row, so you render your own toggle from the isExpanded and toggle context values.

Selection is yours to hold: base-tree tracks expansion only.

College of Engineering
College of Arts and Sciences
School of Continuing Studies (retired)

Filter — $childrenAccessor

<base-tree> <base-search>

Overrides node.children per node, which filters without touching the data. Roots come from $treeData, so they need filtering separately.

Try "lab", "photon" or "coastal" — the last one only matches a grandchild.

College of Engineering
College of Arts and Sciences
School of Continuing Studies (retired)
Expand a node, select one in the content template, or use a row button — the result shows up here.