View as Markdown

API reference: @salmonui/data-grid

DataGridExportOptionsinterface

import type { DataGridExportOptions } from '@salmonui/data-grid';
interface DataGridExportOptions<Row> extends ExportOptions<Row>, DataGridExportHooks<Row> {
    readonly download?: boolean;
}

Options of every export method.

DataGridExportOptions members (13, 12 inherited)
NameSignatureDescription
downloadoptionalreadonly download?: boolean;

Downloads the file (default true); false only resolves it.

pagesoptionalinheritedpages?: "all" | "current";

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

includeHiddenColumnsoptionalinheritedincludeHiddenColumns?: boolean;

Include hidden columns. Default false.

rowsoptionalinheritedrows?: readonly Row[];

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

columnsoptionalinheritedcolumns?: readonly ExportColumnOption[];

Export-only columns, in order.

fileNameoptionalinheritedfileName?: string;

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

hierarchyoptionalinheritedhierarchy?: "all" | "expanded" | "none";

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

treeoptionalinheritedtree?: "all" | "expanded";

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).

celloptionalinheritedcell?: ((ctx: ExportCellHookContext<Row>) => void | ExportCellPatch | null | undefined);

Per data cell. Not called when unset.

headerCelloptionalinheritedheaderCell?: ((ctx: ExportHeaderCellHookContext<Row>) => void | { readonly text?: string; readonly style?: ExportCellStyle; } | null | undefined);

Per header cell.

aggregateCelloptionalinheritedaggregateCell?: ((ctx: ExportAggregateCellHookContext) => void | { readonly text?: string; readonly style?: ExportCellStyle; } | null | undefined);

Per aggregate cell (grid footer, group footer, group caption).

groupCaptionoptionalinheritedgroupCaption?: ((ctx: ExportGroupCaptionHookContext) => void | string | null | undefined);

Group caption text.

detailoptionalinheriteddetail?: ((ctx: ExportDetailContext<Row>) => void | ExportDetail | null | undefined);

A detail block written after a data row (text lines or a child table), or null for none.