@bento-core/table 1.0.1-ccdihub.47 → 1.0.1-ccdihub.48

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.
@@ -36,7 +36,8 @@ const DownloadButton = _ref => {
36
36
  });
37
37
  }
38
38
  console.log('#######table:', table);
39
- console.log('&&&&&&&table:', table.tableInfo);
39
+ console.log('&&&&&&&table:', table.column);
40
+ console.log('*******downloadFileName:', table.downloadFileName);
40
41
  const client = (0, _client.useApolloClient)();
41
42
  const downloadFile = 'CCDI Inventory ';
42
43
  async function downloadSCSVFile() {
@@ -89,15 +89,22 @@ function downloadJson(tableData, table, downloadFileName) {
89
89
  } = _ref3;
90
90
  return dataField;
91
91
  });
92
- const headers = columns.filter(_ref4 => {
92
+ const columnsFilter = columns.filter(_ref4 => {
93
93
  let {
94
94
  dataField
95
95
  } = _ref4;
96
96
  return dataField;
97
- }).map(_ref5 => {
97
+ });
98
+ console.log('????? columnsFilter:', columnsFilter);
99
+ const headers = columns.filter(_ref5 => {
98
100
  let {
99
- header
101
+ dataField
100
102
  } = _ref5;
103
+ return dataField;
104
+ }).map(_ref6 => {
105
+ let {
106
+ header
107
+ } = _ref6;
101
108
  return header;
102
109
  });
103
110
  const csv = convertToCSV(jsonse, keysToInclude, headers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-ccdihub.47",
3
+ "version": "1.0.1-ccdihub.48",
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",
@@ -24,7 +24,8 @@ const DownloadButton = ({
24
24
  return <CloudDownload className="disableButton" style={downloadButtonStyle} />;
25
25
  }
26
26
  console.log('#######table:', table);
27
- console.log('&&&&&&&table:', table.tableInfo);
27
+ console.log('&&&&&&&table:', table.column);
28
+ console.log('*******downloadFileName:', table.downloadFileName);
28
29
 
29
30
  const client = useApolloClient();
30
31
 
@@ -66,6 +66,8 @@ export function downloadJson(tableData, table, downloadFileName) {
66
66
  const jsonse = JSON.stringify(formatDataVal);
67
67
  const keysToInclude = columns.filter(({ dataField }) => dataField)
68
68
  .map(({ dataField }) => dataField);
69
+ const columnsFilter = columns.filter(({ dataField }) => dataField);
70
+ console.log('????? columnsFilter:', columnsFilter);
69
71
  const headers = columns.filter(({ dataField }) => dataField).map(({ header }) => header);
70
72
  const csv = convertToCSV(jsonse, keysToInclude, headers);
71
73
  const exportData = new Blob([csv], { type: 'text/csv' });