@antadesign/table
    Preparing search index...

    Interface TableDownloadOptions<T>

    interface TableDownloadOptions<T> {
        fileName?: string;
        serializeRow?: (row: T, index: number) => Record<string, unknown>;
        custom?: (context: TableDownloadContext<T>) => TableDownload[];
        save?: (
            file: { fileName: string; content: Blob | string; type?: string },
        ) => void;
    }

    Type Parameters

    • T
    Index
    fileName?: string

    Base name for the built-in files; each format replaces the extension.

    table-rows
    
    serializeRow?: (row: T, index: number) => Record<string, unknown>

    Turns one row into the record that is written. Its keys become the TXT and CSV header and the JSON fields.

    custom?: (context: TableDownloadContext<T>) => TableDownload[]

    Replaces the built-in TXT, CSV, and JSON files.

    save?: (
        file: { fileName: string; content: Blob | string; type?: string },
    ) => void

    Saves a file. Without it, the table saves through a temporary link, which needs document; pass save when the table renders where there is none, such as a worker.