[CSV Export] Begin testing exportService
...including fixes to immediately-identified errors.
This commit is contained in:
@@ -29,10 +29,10 @@ define(['csv'], function (CSV) {
|
||||
|
||||
ExportService.prototype.exportCSV = function (rows, options) {
|
||||
var headers = (options && options.headers) ||
|
||||
(Object.keys((rows[0] || {}).sort())),
|
||||
(Object.keys((rows[0] || {})).sort()),
|
||||
filename = (options && options.filename) || "export.csv",
|
||||
csvText = new CSV(rows, { header: headers }).encode(),
|
||||
blob = new Blob(csvText, { type: "text/csv" });
|
||||
blob = new Blob([ csvText ] , { type: "text/csv" });
|
||||
this.saveAs(blob, filename);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user