Skip to main content
cngx-src documentation

CNGX_FILTER_BUILDER_CONFIG

Tokenv0.1.0

InjectionToken<CngxFilterBuilderConfig>

Description#

Resolved CngxFilterBuilderConfig every <cngx-filter-builder> in scope reads for its defaults. Each slice comes from one with* feature:

  • templates - withTemplates
  • i18n bundle - withFilterBuilderI18n
  • max nesting depth - withMaxNestingDepth (default 8)
  • operator lists per editor type - withDefaultOperators
  • logic options (the and/or/xor picker) - withLogicOptions (default ['and', 'or'])
  • negation toggle - withNegation (default off)
  • skeleton row count - withSkeletonCount (default 3)

Provide it through one of two entry points, never the token directly:

  • provideFilterBuilderConfig(...) returns EnvironmentProviders - for an environment injector (app bootstrap or a lazy route).
  • provideFilterBuilderConfigAt(...) returns Provider[] - for a component's providers / viewProviders.

Resolution is nearest-wins and replace, not merge: a nested provider shadows the ancestor config for its subtree rather than deep-merging into it. The default factory returns CNGX_FILTER_BUILDER_DEFAULTS. Editors are separate - swap them via CNGX_FILTER_EDITORS, not here.

Type#

InjectionToken<CngxFilterBuilderConfig>