@bento-core/table 1.0.1-ccdihub.64 → 1.0.1-ccdihub.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -129,7 +129,9 @@ function downloadJson(tableData, table, downloadFileName) {
|
|
|
129
129
|
return !_Types.actionCellTypes.includes(cellType);
|
|
130
130
|
});
|
|
131
131
|
let formatDataVal = (0, _Dataformat.formatColumnValues)(filterColumns, tableData);
|
|
132
|
-
|
|
132
|
+
filterColumns.forEach(column => {
|
|
133
|
+
formatDataVal = JSON.parse(JSON.stringify(formatDataVal).split(column.dataField).join(column.header));
|
|
134
|
+
});
|
|
133
135
|
const jsonse = JSON.stringify(formatDataVal);
|
|
134
136
|
const exportData = new Blob([jsonse], {
|
|
135
137
|
type: 'application/json'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/table",
|
|
3
|
-
"version": "1.0.1-ccdihub.
|
|
3
|
+
"version": "1.0.1-ccdihub.65",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
|
|
@@ -31,6 +31,5 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@apollo/client": "^3.8.3"
|
|
33
33
|
},
|
|
34
|
-
"description": ""
|
|
35
|
-
"gitHead": "434b75e40defa37c9816a7f74de184b0129683e2"
|
|
34
|
+
"description": ""
|
|
36
35
|
}
|
|
@@ -87,7 +87,11 @@ export function downloadJson(tableData, table, downloadFileName) {
|
|
|
87
87
|
const { columns = [] } = table;
|
|
88
88
|
const filterColumns = columns.filter(({ cellType }) => !actionCellTypes.includes(cellType));
|
|
89
89
|
let formatDataVal = formatColumnValues(filterColumns, tableData);
|
|
90
|
-
|
|
90
|
+
filterColumns.forEach((column) => {
|
|
91
|
+
formatDataVal = JSON.parse(
|
|
92
|
+
JSON.stringify(formatDataVal).split(column.dataField).join(column.header),
|
|
93
|
+
);
|
|
94
|
+
});
|
|
91
95
|
const jsonse = JSON.stringify(formatDataVal);
|
|
92
96
|
const exportData = new Blob([jsonse], { type: 'application/json' });
|
|
93
97
|
const JsonURL = window.URL.createObjectURL(exportData);
|