Skip to content

FilterTreeComponent

Defined in: filtering/tree/filter-tree.component.ts:58

Root component for editing a filter tree with drag-and-drop and undo/redo.

  • OnInit

new FilterTreeComponent(): FilterTreeComponent

FilterTreeComponent

allDropListIds: Signal<string[]>

Defined in: filtering/tree/filter-tree.component.ts:110

Flat array of ALL cdkDropList IDs currently in the tree. Passed to [cdkDropListConnectedTo] on every branch body so cross-branch dragging works. Each branch contributes one ID: drop-list-<nodeId>.


readonly canClearAll: Signal<boolean>

Defined in: filtering/tree/filter-tree.component.ts:93

True when the tree has at least one child (i.e. there are filters to clear).


readonly canRedo: Signal<boolean>

Defined in: filtering/tree/filter-tree.component.ts:91

True when there’s at least one state to redo to.


readonly canUndo: Signal<boolean>

Defined in: filtering/tree/filter-tree.component.ts:89

True when there’s at least one state to undo to.


initialTree: InputSignal<FilterNode | undefined>

Defined in: filtering/tree/filter-tree.component.ts:68

Optional initial tree. If not provided, an empty root branch is created. The component makes its own internal copy so callers don’t need to worry about mutations.


readonly root: WritableSignal<FilterNode>

Defined in: filtering/tree/filter-tree.component.ts:78

The authoritative tree state. All mutations update this signal.


treeChange: OutputEmitterRef<FilterNode>

Defined in: filtering/tree/filter-tree.component.ts:71

Emitted after every successful tree mutation (including undo/redo).

applyExternalUpdate(newRoot): void

Defined in: filtering/tree/filter-tree.component.ts:203

Apply an external tree mutation through the history stack. Used by FilterEditorComponent when appending a new leaf.

FilterNode

void


clearAll(): void

Defined in: filtering/tree/filter-tree.component.ts:169

void


ngOnInit(): void

Defined in: filtering/tree/filter-tree.component.ts:120

A callback method that is invoked immediately after the default change detector has checked the directive’s data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

void

OnInit.ngOnInit


onConjunctionToggle(branchId): void

Defined in: filtering/tree/filter-tree.component.ts:143

Handle a conjunction toggle from any branch.

string

void


onKeydown(event): void

Defined in: filtering/tree/filter-tree.component.ts:188

KeyboardEvent

void


onNodeDelete(nodeId): void

Defined in: filtering/tree/filter-tree.component.ts:149

Handle a node deletion from anywhere in the tree.

string

void


onNodeDrop(event): void

Defined in: filtering/tree/filter-tree.component.ts:135

Handle a drop event from any node in the tree. resolveDropPosition runs inside FilterNodeComponent at drop time, so we receive a fully resolved DropPosition here.

string

DropPosition

void


redo(): void

Defined in: filtering/tree/filter-tree.component.ts:175

void


undo(): void

Defined in: filtering/tree/filter-tree.component.ts:160

void