CngxFilterBuilderPresenter
projects/forms/filter-builder/filter-builder-presenter.directive.ts
Import#
import { CngxFilterBuilderPresenter } from '@cngx/forms/filter-builder'
Description#
Brain of <cngx-filter-builder>. Hosts the state factory bound to a
model<FilterGroup> for [(value)] two-way binding, and provides
CNGX_FILTER_BUILDER_HOST via useExisting so the recursive context
atoms read one source of truth. Implements CngxFormFieldControl
(id / empty / disabled / focused / errorState / focus); the
disabled / focused / errorState scalars derive from the ambient
CngxFormFieldPresenter when the opt-in
CngxFilterBuilderFormFieldControl directive is applied.
Metadata#
Providers#
CNGX_FILTER_BUILDER_HOST- useExisting
CngxFilterBuilderPresenter
Relationships
Depends on1
Index#
Inputs#
Outputs#
FilterGroupInstance Properties#
SignalCngxFormFieldControl empty - true while the tree carries no expressions.
this.core.isEmptySignalCngxFormFieldControl id - stable per-instance, generated once.
signal(nextUid('cngx-filter-builder-')).asReadonly()Methods#
addExpression(path: unknown, expression: FilterExpression)unknownfocus(options?: FocusOptions)Focus the first incomplete expression's first focusable descendant;
falls back to the host element when no expression is incomplete. The
row↔presenter correlation runs through the data-cngx-filter-path
attribute each rendered row carries.
FocusOptions