Skip to main content
cngx-src documentation

CngxFilterOperatorDef

Interface

projects/forms/filter-builder/filter-builder-operators.ts

Import#

import { CngxFilterOperatorDef } from '@cngx/forms/filter-builder'

Description#

One operator definition: how the operator evaluates an item value against the expression value, an optional default label for the operator picker (resolution order: i18n.operators[key] ?? def.label ?? raw key), and valueless for operators that are complete without an expression value (isEmpty / isNotEmpty family) - a valueless operator is exempt from the empty-value no-op short-circuit.

Register custom definitions through withOperators({...}); the key only appears in a row's operator picker when a FilterFieldDef.operators list or a withDefaultOperators entry names it.

Index#

Methods

Instance Properties#

label#string
ReadonlyOptional
valueless#boolean
ReadonlyOptional

Methods#

evaluate#boolean
evaluate(itemValue: unknown, exprValue: unknown, ctx: CngxFilterOperatorContext)
@paramitemValueunknown
@paramexprValueunknown