Fixed csv export for V3

pull/496/head
Cagatay Civici 2020-09-24 11:14:55 +03:00
parent 927e7df1cd
commit f114c0247f
1 changed files with 5 additions and 5 deletions

View File

@ -937,8 +937,8 @@ export default {
//headers
for (let i = 0; i < this.columns.length; i++) {
let column = this.columns[i];
if (column.exportable !== false && column.field) {
csv += '"' + (column.header || column.field) + '"';
if (column.props.exportable !== false && column.props.field) {
csv += '"' + (column.props.header || column.props.field) + '"';
if (i < (this.columns.length - 1)) {
csv += this.csvSeparator;
@ -952,14 +952,14 @@ export default {
csv += '\n';
for (let i = 0; i < this.columns.length; i++) {
let column = this.columns[i];
if (column.exportable !== false && column.field) {
let cellData = ObjectUtils.resolveFieldData(record, column.field);
if (column.props.exportable !== false && column.props.field) {
let cellData = ObjectUtils.resolveFieldData(record, column.props.field);
if (cellData != null) {
if (this.exportFunction) {
cellData = this.exportFunction({
data: cellData,
field: column.field
field: column.props.field
});
}
else