View as Markdown

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

createExportStreamfunction

import { createExportStream } from '@salmonui/data-grid/engine/export-server';
function createExportStream<Row>(source: ServerExportSource<Row>, options: ServerExportOptions<Row>, handlers?: ServerExportHandlers<Row>): Promise<ExportStream | null>;

Starts an export: raises onBeforeExport (null when prevented), builds the export model, and returns the file name, MIME type, download headers, and the bytes as an async iterable. Nothing is written until chunks is read.