View as Markdown

API reference: @salmonui/data-grid/engine/export

ExportOptionsinterface

import type { ExportOptions } from '@salmonui/data-grid/engine/export';
interface ExportOptions<Row> {
    readonly pages?: 'current' | 'all';
    readonly includeHiddenColumns?: boolean;
    readonly rows?: readonly Row[];
    readonly columns?: readonly ExportColumnOption[];
    readonly fileName?: string;
    readonly hierarchy?: 'expanded' | 'all' | 'none';
    readonly tree?: 'expanded' | 'all';
}

Options shared by exportCsv, exportXlsx, and exportPdf.

ExportOptions members (7)
NameSignatureDescription
pagesoptionalreadonly pages?: 'current' | 'all';

all (default): every page of the current query. current: the current page as shown.

includeHiddenColumnsoptionalreadonly includeHiddenColumns?: boolean;

Include hidden columns. Default false.

rowsoptionalreadonly rows?: readonly Row[];

Rows to export instead of the grid rows (for example the selected rows), with the grid's columns.

columnsoptionalreadonly columns?: readonly ExportColumnOption[];

Export-only columns, in order.

fileNameoptionalreadonly fileName?: string;

Download name; the format extension is added when missing. Default export.

hierarchyoptionalreadonly hierarchy?: 'expanded' | 'all' | 'none';

Detail and child-grid rows: expanded (default), all, or none.

treeoptionalreadonly tree?: 'expanded' | 'all';

Tree mode rows: expanded (default) exports the visible rows in pre-order; all exports every kept row regardless of expansion (XLSX outlineCollapsed then keeps the collapsed state).