@bento-core/table 1.0.0-c3dc.34 → 1.0.0-c3dc.35
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.
|
@@ -35,7 +35,7 @@ const ManageColumnView = _ref => {
|
|
|
35
35
|
const [listDisplay, setListDisplay] = (0, _react.useState)('none');
|
|
36
36
|
const [selectAll, setSelectAll] = (0, _react.useState)(false);
|
|
37
37
|
const [needsScroll, setNeedsScroll] = (0, _react.useState)(false);
|
|
38
|
-
const viewColumns = columns.filter(col => col.role === _Types.cellTypes.DISPLAY && col.
|
|
38
|
+
const viewColumns = columns.filter(col => col.role === _Types.cellTypes.DISPLAY && col.downloadOnly !== true);
|
|
39
39
|
const dropdownSelection = (0, _react.useRef)(null);
|
|
40
40
|
const formGroupRef = (0, _react.useRef)(null);
|
|
41
41
|
const handleClose = () => {
|
|
@@ -86,10 +86,11 @@ function downloadData(tableData, table, downloadFileName) {
|
|
|
86
86
|
return !doNotDownload;
|
|
87
87
|
}).filter(_ref3 => {
|
|
88
88
|
let {
|
|
89
|
-
display
|
|
89
|
+
display,
|
|
90
|
+
downloadOnly
|
|
90
91
|
} = _ref3;
|
|
91
|
-
return display;
|
|
92
|
-
});
|
|
92
|
+
return display || downloadOnly;
|
|
93
|
+
}); // want to download hidden columns ('download only columns')
|
|
93
94
|
let formatDataVal = (0, _Dataformat.formatColumnValues)(filterColumns, tableData);
|
|
94
95
|
formatDataVal = formatDataVal.map(item => {
|
|
95
96
|
const updatedItem = {};
|
package/package.json
CHANGED
|
@@ -41,7 +41,7 @@ const ManageColumnView = ({
|
|
|
41
41
|
const [needsScroll, setNeedsScroll] = useState(false);
|
|
42
42
|
|
|
43
43
|
const viewColumns = columns.filter((col) => col.role === cellTypes.DISPLAY
|
|
44
|
-
&& col.
|
|
44
|
+
&& col.downloadOnly !== true);
|
|
45
45
|
|
|
46
46
|
const dropdownSelection = useRef(null);
|
|
47
47
|
const formGroupRef = useRef(null);
|
|
@@ -66,7 +66,7 @@ export function downloadData(tableData, table, downloadFileName, format = 'csv')
|
|
|
66
66
|
const filterColumns = columns
|
|
67
67
|
.filter(({ cellType }) => !actionCellTypes.includes(cellType))
|
|
68
68
|
.filter(({ doNotDownload }) => !doNotDownload)
|
|
69
|
-
.filter(({ display }) => display);
|
|
69
|
+
.filter(({ display, downloadOnly }) => display || downloadOnly); // want to download hidden columns ('download only columns')
|
|
70
70
|
let formatDataVal = formatColumnValues(filterColumns, tableData);
|
|
71
71
|
|
|
72
72
|
formatDataVal = formatDataVal.map((item) => {
|