useDataExport()
This hook provides easy way to export data in your preferred format (csv/xlsx/raw) for the provided IPreparedExecution.
export declare function useDataExport(input: {
execution: IPreparedExecution | undefined | null;
exportConfig?: IExportConfig;
} & UseDataExportCallbacks, deps?: DependencyList): UseDataExportState;
Parameters
Parameter | Type | Description |
|---|---|---|
{ execution, exportConfig, onCancel, onError, onLoading, onPending, onSuccess, } | (not declared) | |
input | { execution: IPreparedExecution | undefined | null; exportConfig?: IExportConfig; } & UseDataExportCallbacks | |
deps | DependencyList | (Optional) |
Returns
Remarks
As a result, you will receive a string with uri, so you can easily create a download link. Be aware that execution is re-executed only on dependency list change, not on execution/exportConfig/callbacks change.