Improve export to CSV functionality
- added`callback`option so we can get CSV data in case we do not want to download - added options: - `quoted` for cases when we have line breaks in content - `separator` for cases when we have commas in content
This commit is contained in:
parent
109465d3c5
commit
fb8479988c
2 changed files with 32 additions and 27 deletions
|
@ -714,8 +714,9 @@
|
|||
let noHeader = false;
|
||||
if ('noHeader' in params) noHeader = params.noHeader;
|
||||
|
||||
const data = Csv(columns, datas, ',', noHeader);
|
||||
ExportCsv.download(params.filename, data);
|
||||
const data = Csv(columns, datas, params, noHeader);
|
||||
if (params.callback) params.callback(data);
|
||||
else ExportCsv.download(params.filename, data);
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue