booleanColumn
function booleanColumn<F>(options?): TableColumnSpec<boolean, "boolean", NoInfer<F>>;Defined in: filters/tanstack-table.ts:425
A yes/no filter: a boolean becomes eq. Anything else (including
undefined, the “any” state of a tri-state control) means “no filter”.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
F extends string | undefined |
undefined |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
FieldOption<F> |
Returns
Section titled “Returns”TableColumnSpec<boolean, "boolean", NoInfer<F>>
Example
Section titled “Example”import { booleanColumn } from "@xtandard/lib/filters/tanstack-table";
booleanColumn().toFilter(true); // → { kind: "boolean", operator: "eq", value: true }booleanColumn().toFilter("true"); // → null