API reference: @salmonui/data-grid/engine
CompiledColumninterface
import type { CompiledColumn } from '@salmonui/data-grid/engine';Also exported from @salmonui/data-grid.
interface CompiledColumn<Row> {
readonly columnId: ColumnId;
readonly path: readonly ColumnId[];
readonly leaf: boolean;
readonly depth: number;
readonly leafIndex: number;
readonly children: readonly ColumnId[];
readonly def: ColumnDef<Row>;
readonly field: string | null;
readonly headerText: string;
readonly accessor: (row: Row) => unknown;
readonly setter: ((row: Row, value: unknown) => Row) | null;
readonly type: ColumnType;
readonly typeSource: ColumnTypeSource;
readonly format: FormatDescriptor | null;
readonly formatter: (value: unknown, row: Row) => string;
readonly clipboardFormatter: (value: unknown, row: Row) => string;
readonly parser: (input: unknown, row: Row) => unknown;
readonly comparer: (a: unknown, b: unknown, rowA: Row, rowB: Row) => number;
readonly width: ColumnWidthSpec;
readonly flags: ColumnFlags;
readonly freeze: 'left' | 'right' | 'fixed' | null;
readonly moduleMeta: Readonly<Record<string, unknown>>;
readonly lookup?: CompiledLookup;
}
| Name | Signature | Description |
|---|---|---|
columnId | readonly columnId: ColumnId; | |
path | readonly path: readonly ColumnId[]; | Stacked header ancestry, root first, including this column. |
leaf | readonly leaf: boolean; | |
depth | readonly depth: number; | Header depth (0 for top level). |
leafIndex | readonly leafIndex: number; | Position among leaf columns in definition order; -1 for group headers. |
children | readonly children: readonly ColumnId[]; | Child column ids for group headers; empty for leaves. |
def | readonly def: ColumnDef<Row>; | |
field | readonly field: string | null; | |
headerText | readonly headerText: string; | |
accessor | readonly accessor: (row: Row) => unknown; | |
setter | readonly setter: ((row: Row, value: unknown) => Row) | null; | |
type | readonly type: ColumnType; | |
typeSource | readonly typeSource: ColumnTypeSource; | |
format | readonly format: FormatDescriptor | null; | |
formatter | readonly formatter: (value: unknown, row: Row) => string; | |
clipboardFormatter | readonly clipboardFormatter: (value: unknown, row: Row) => string; | |
parser | readonly parser: (input: unknown, row: Row) => unknown; | |
comparer | readonly comparer: (a: unknown, b: unknown, rowA: Row, rowB: Row) => number; | |
width | readonly width: ColumnWidthSpec; | |
flags | readonly flags: ColumnFlags; | |
freeze | readonly freeze: 'left' | 'right' | 'fixed' | null; | Definition freeze: |
moduleMeta | readonly moduleMeta: Readonly<Record<string, unknown>>; | Filled by module |
lookupoptional | readonly lookup?: CompiledLookup; | Set by the |