InFilterValue

View as Markdown

Item in the IN Column Filter

TypeScript
export interface

Properties

PropertyTypeDescription
childrenInFilterValue<ValueType>[]Child items, used for a grouped or date tree. Selecting a parent selects its leaves.
expressionFunctionstringName of a no-input (unary, column-only) boolean AdapTable Expression
Function to apply to this Column when the Item is selected — e.g.
'IS_BLANK', 'IS_POSITIVE', 'IS_YESTERDAY'.

Instead of matching value literally in the IN list, AdapTable
evaluates <expressionFunction>([thisColumn]) and OR-combines it with
the rest of the filter. AdapTable injects the Column, so the developer
does not need to write any AQL.

The named function must be a known unary boolean Expression Function
that is applicable to the Column's data type; otherwise the Item is
skipped (with a console warning).
labelstring | InFilterValueLabelFnItem's label.

Either a string, or a function that returns the label. The function is
re-evaluated whenever filtering changes, so the label can embed live info
(e.g. visibleCount) without customInFilterValues being called again:

The function receives the item's default (same shape
as context.defaultValues), looked up by value.
levelnumberDepth of this item when the list is a tree. 0 is the root.
tooltipboolean | stringTooltip for Item (if true, the label is used as tooltip)
valueValueTypeThe value of Item being shown.

Optional when expressionFunction is provided (the function name is
then used as the item's identity).

Property Details

children

Child items, used for a grouped or date tree. Selecting a parent selects its leaves.

TypeScript
children?: InFilterValue<ValueType>[];
Property Value

InFilterValue<ValueType>[]

expressionFunction

Name of a no-input (unary, column-only) boolean AdapTable Expression Function to apply to this Column when the Item is selected — e.g. 'IS_BLANK', 'IS_POSITIVE', 'IS_YESTERDAY'.

Instead of matching value literally in the IN list, AdapTable evaluates <expressionFunction>([thisColumn]) and OR-combines it with the rest of the filter. AdapTable injects the Column, so the developer does not need to write any AQL.

The named function must be a known unary boolean Expression Function that is applicable to the Column's data type; otherwise the Item is skipped (with a console warning).

TypeScript
expressionFunction?: string;
Property Value

string

label

Item's label.

Either a string, or a function that returns the label. The function is re-evaluated whenever filtering changes, so the label can embed live info (e.g. visibleCount) without customInFilterValues being called again: ```tslabel: (item) => ${item.label} (${item.visibleCount})

The function receives the item&#39;s default  (same shape
as `context.defaultValues`), looked up by `value`.


```ts title="TypeScript"
label: string | InFilterValueLabelFn;
Property Value

string | InFilterValueLabelFn

level

Depth of this item when the list is a tree. 0 is the root.

TypeScript
level?: number;
Property Value

number

tooltip

Tooltip for Item (if true, the label is used as tooltip)

TypeScript
tooltip?: boolean | string;
Property Value

boolean | string

value

The value of Item being shown.

Optional when expressionFunction is provided (the function name is then used as the item's identity).

TypeScript
value?: ValueType;
Property Value

ValueType