Hi
When I export a grid to excel, it fails for
Uncaught (in promise) TypeError: txt[0] is undefined
getAggreateValue excel-export.js:720
fillAggregates excel-export.js:616
processAggregates excel-export.js:590
processRecordContent excel-export.js:367
processGridExport excel-export.js:341
processInnerRecords excel-export.js:229
processInnerRecords excel-export.js:227
processRecords excel-export.js:154
The specific location of the failure is here:
ExcelExport.prototype.getAggreateValue = function (cellType, template, cell, row) {
var templateFn = {};
templateFn[getEnumValue(CellType, cell.cellType)] = compile(template);
/* tslint:disable-next-line:max-line-length */
var txt = (templateFn[getEnumValue(CellType, cell.cellType)](row.data[cell.column.field ? cell.column.field : cell.column.columnName]));
return txt[0].textContent; <<<<<<<<<<<<<<<<<<<<<<<<
};
Because txt length is 0, it fails on udefined. Not sure if it's data related or a bug so I will try to write as much info as I can. The failure is of column X and that column has an agg function.
<e-column type="Count" field="X" :footerTemplate="footerCount"></e-column>
footerCount() {
return {
template: Vue.component("Count", {
template: "<span>{{data.Count}} assets</span>",
data() {
return {
data: {},
};
},
}),
};
},
Let me know if more data is needed.
Thanks