CngxFilterBuilderBody
projects/forms/filter-builder/filter-builder-body.component.ts
Import#
import { CngxFilterBuilderBody } from '@cngx/forms/filter-builder'
Description#
Recursive renderer for <cngx-filter-builder>. Owns the slot-cascade
machinery for every per-row visible region (addFilterButton,
addGroupButton, removeButton, logicToggle, negationToggle,
expressionTemplate, groupTemplate) plus path-keyed context caches.
Internal - not exported through public-api.ts. The host component
(CngxFilterBuilder) mounts this body directly; state-driven UI
(loading / error / refreshing) is the consumer's concern (wrap with
<cngx-async-container [state]>). The body lifts behind
CNGX_FILTER_BUILDER_BODY_HOST so consumers can swap the recursive
renderer without forking the shell.
Metadata#
Dependencies#
CNGX_FILTER_BUILDER_HOSTinject()hostRelationships
Index#
Inputs#
CngxFilterBuilderTemplateRegistryInstance Properties#
{
addFilter: () => this.addFilterAt(this.rootPath),
addGroup: () => this.addGroupAt(this.rootPath),
}Methods#
AddFilterButtonCtxaddFilterButtonContext(path: unknown)unknownAddGroupButtonCtxaddGroupButtonContext(path: unknown)unknowncanAddGroupAt(path: unknown)A group added at path sits at depth path.length + 1 (root is depth
0), so adding is allowed while path.length < maxNestingDepth.
unknowncycleLogic(path: unknown, current: FilterLogic)Joiner-chip handler: advance the group's logic to the next configured option (and -> or -> xor -> and). Every joiner in a group mirrors the same value - logic is a per-group property, the chips are its N visible instances between siblings.
unknownExpressionTemplateCtxexpressionTemplateContext(expression: FilterExpression, path: unknown)unknownGroupTemplateCtxgroupTemplateContext(group: FilterGroup, path: unknown)unknownLogicToggleCtxlogicToggleContext(group: FilterGroup, path: unknown)unknownNegationToggleCtxnegationToggleContext(group: FilterGroup, path: unknown)unknownRemoveButtonCtxremoveButtonContext(path: unknown, label: string)unknown