Skip to content

Commit 17c6ae6

Browse files
author
sowvikr
committed
1. Added new feature. Now datatable can export the full data as CSV
1 parent b354363 commit 17c6ae6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

projects/angular-open-datagrid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-open-datagrid",
3-
"version": "1.1.1",
3+
"version": "1.2.0",
44
"license": "(MIT)",
55
"homepage": "https://github.com/sowvikr/angular-open-datagrid-lilb",
66
"bugs": {

projects/angular-open-datagrid/src/lib/context-menu/context-menu.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,28 +82,28 @@ export class ContextMenuComponent implements OnInit {
8282
this.onDelete.delete(this.contextData);
8383
}
8484
}
85-
/*,
85+
,
8686
{
8787
text: 'Export', shortcut: ' ', icon: null, onClick() {
8888
let col = [];
8989
for (let i = 0; i < this.columnData.length; ++i) {
90-
col.push(this.columnData[i].field);
90+
col.push(this.columnData[i].headerName);
9191
}
9292
const options = {
9393
fieldSeparator: ',',
9494
quoteStrings: '"',
9595
decimalSeparator: '.',
9696
showLabels: true,
9797
showTitle: true,
98-
title: 'Data',
98+
title: 'Data exported as CSV',
9999
useTextFile: false,
100100
useBom: true,
101101
headers: col
102102
};
103103
const csvExporter = new ExportToCsv(options);
104104

105105
csvExporter.generateCsv(this.rowData); }
106-
}*/
106+
}
107107
];
108108
@ViewChild('contextMenu') contextMenu:ElementRef;
109109

0 commit comments

Comments
 (0)