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