API reference: @salmonui/data-grid/engine/export
ExportColumninterface
import type { ExportColumn } from '@salmonui/data-grid/engine/export';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;
}
| Name | Signature | Description |
|---|---|---|
index | readonly index: number; | Position in |
columnId | readonly columnId: ColumnId; | |
field | readonly field: string | null; | |
headerText | readonly headerText: string; | |
type | readonly type: ColumnType; | |
width | readonly width: number; | Width in CSS px (runtime width, else the numeric definition width, else 150). |
textAlign | readonly textAlign: 'start' | 'center' | 'end'; | |
format | readonly format: FormatDescriptor | null; | |
freeze | readonly freeze: 'left' | 'right' | null; | Freeze zone of the column at export time. |
visible | readonly visible: boolean; | |
column | readonly column: ExportSourceColumn<Row>; | The host column the export column was built from (the Data Grid passes its compiled column). |
value | value(row: Row): unknown; | Typed value of a row (numbers, booleans, |
text | text(row: Row): string; | Display text of a row (column formatter, |