Skip to content

Commit b101b2f

Browse files
feat(IgxGridBaseDirective): fix copying when copyHeaders is disabled
1 parent 5413a1d commit b101b2f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5544,13 +5544,11 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
55445544

55455545
if (!this.clipboardOptions.copyHeaders) {
55465546
result = result.substring(result.indexOf('\n') + 1);
5547-
}
5548-
5549-
if (Object.values(data[0]).length === 1) {
5550-
result = result.slice(0, -2);
5551-
if (!this.clipboardOptions.copyHeaders) {
5547+
if (Object.values(data[0]).length === 1) {
55525548
result = result.substring(data[0], result.indexOf('\n'));
55535549
}
5550+
} else if (Object.values(data[0]).length === 1 && this.clipboardOptions.copyHeaders) {
5551+
result = result.slice(0, -2);
55545552
}
55555553

55565554
event.preventDefault();

0 commit comments

Comments
 (0)