selectColumn
function selectColumn<K, F>(options?): TableColumnSpec<SelectValue<NoInfer<K>>, NoInfer<K>, NoInfer<F>>;Defined in: filters/tanstack-table.ts:341
A single-choice select (TanStack’s equals): the chosen value becomes an
eq filter of kind (default enum; text and number work too).
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
K extends SelectKind |
"enum" |
F extends string | undefined |
undefined |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
FieldOption<F> & object |
Returns
Section titled “Returns”TableColumnSpec<SelectValue<NoInfer<K>>, NoInfer<K>, NoInfer<F>>
Example
Section titled “Example”import { selectColumn } from "@xtandard/lib/filters/tanstack-table";
selectColumn().toFilter("open"); // → { kind: "enum", operator: "eq", value: "open" }selectColumn({ kind: "number" }).toFilter("2"); // → { kind: "number", operator: "eq", value: 2 }