Skip to content

Commit 0c6dde1

Browse files
Merge pull request #8892 from IgniteUI/ibarakov/fix-8853-10.2.x
fix(excel-export): use field if header is undefined or empty
2 parents b9cdd97 + 6107d68 commit 0c6dde1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/igniteui-angular/src/lib/services/exporter-common/base-export-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export abstract class IgxBaseExporter {
125125
let lastVisbleColumnIndex = -1;
126126

127127
columns.forEach((column) => {
128-
const columnHeader = column.header !== '' ? column.header : column.field;
128+
const columnHeader = !ExportUtilities.isNullOrWhitespaces(column.header) ? column.header : column.field;
129129
const exportColumn = !column.hidden || options.ignoreColumnsVisibility;
130130
const index = options.ignoreColumnsOrder ? column.index : column.visibleIndex;
131131
const columnWidth = Number(column.width.slice(0, -2));

0 commit comments

Comments
 (0)