View as Markdown

API reference: @salmonui/core/export-model

ExportColumninterface

import type { ExportColumn } from '@salmonui/core/export-model';
interface ExportColumn<Row> {
    readonly index: number;
    readonly columnId: ColumnId;
    readonly field: string | null;
    readonly headerText: string;
    readonly type: ColumnType;
    readonly width: number;
    readonly textAlign: 'start' | 'center' | 'end';
    readonly format: FormatDescriptor | null;
    readonly freeze: 'left' | 'right' | null;
    readonly visible: boolean;
    readonly column: ExportSourceColumn<Row>;
    value(row: Row): unknown;
    text(row: Row): string;
}
ExportColumn members (13)
NameSignatureDescription
indexreadonly index: number;

Position in model.columns.

columnIdreadonly columnId: ColumnId;
fieldreadonly field: string | null;
headerTextreadonly headerText: string;
typereadonly type: ColumnType;
widthreadonly width: number;

Width in CSS px (runtime width, else the numeric definition width, else 150).

textAlignreadonly textAlign: 'start' | 'center' | 'end';
formatreadonly format: FormatDescriptor | null;
freezereadonly freeze: 'left' | 'right' | null;

Freeze zone of the column at export time.

visiblereadonly visible: boolean;
columnreadonly column: ExportSourceColumn<Row>;

The host column the export column was built from (the Data Grid passes its compiled column).

valuevalue(row: Row): unknown;

Typed value of a row (numbers, booleans, Date for date columns, strings).

texttext(row: Row): string;

Display text of a row (column formatter, formatValue).