foundation-forms.downloadcsvtemplate
Home > @genesislcap/foundation-forms > downloadCsvTemplate
downloadCsvTemplate() function
Triggers a download of the CSV template file in the browser.
Signature:
export declare function downloadCsvTemplate(csvContent: string, fileName?: string): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
csvContent |
string |
The CSV content to download |
|
fileName |
string |
(Optional) The name for the downloaded file (default: 'template.csv') |
Returns:
void
Remarks
Browser-only; uses document and URL.createObjectURL. Will throw in Node.js.