Skip to main content
cngx-src documentation

createTreeAdItems

Functioncommon/interactive/treev0.1.0

projects/common/interactive/tree-controller/tree-ad-items.ts

Description#

Projects a tree controller's visibleNodes into the ActiveDescendantItem[] shape consumed by CngxActiveDescendant.items. Kept as a helper (not a method on the controller) so CngxTreeController stays free of the @cngx/common/a11y import and can be reused from contexts that do not render through AD.

Returns a structurally-equal memoized computed - consumers can pass the signal straight into [items]="adItems()" without worrying about cascade re-renders on irrelevant tree re-emissions.

Signature#

createTreeAdItems(ctrl: CngxTreeController)

Parameters#

Returns#

Signal