@bento-core/table 1.0.0-c3dc.34 → 1.0.0-c3dc.36
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 = () => {
|
|
@@ -285,7 +285,7 @@ const styles = () => ({
|
|
|
285
285
|
backgroundColor: '#375F9A',
|
|
286
286
|
marginTop: '5px',
|
|
287
287
|
marginBottom: '5px',
|
|
288
|
-
width: '
|
|
288
|
+
width: '100%',
|
|
289
289
|
position: 'relative',
|
|
290
290
|
left: '-10px',
|
|
291
291
|
height: '0.5px'
|
|
@@ -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);
|
|
@@ -301,7 +301,7 @@ const styles = () => ({
|
|
|
301
301
|
backgroundColor: '#375F9A',
|
|
302
302
|
marginTop: '5px',
|
|
303
303
|
marginBottom: '5px',
|
|
304
|
-
width: '
|
|
304
|
+
width: '100%',
|
|
305
305
|
position: 'relative',
|
|
306
306
|
left: '-10px',
|
|
307
307
|
height: '0.5px',
|
|
@@ -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) => {
|