@topconsultnpm/sdkui-react 6.21.0-dev3.13 → 6.21.0-dev3.15
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.
|
@@ -69,15 +69,24 @@ const TMDataGridExportForm = (props) => {
|
|
|
69
69
|
const selectedSet = new Set(selectedRowKeys);
|
|
70
70
|
// If exporting only selected rows, filter the dataSource accordingly; otherwise use the full dataSource
|
|
71
71
|
const rowsToExport = exportSelectedOnly ? dataSource.filter((item) => selectedSet.has(item.rowIndex)) : dataSource;
|
|
72
|
-
// Filter columns to only those that are visible; optionally
|
|
72
|
+
// Filter columns to only those that are visible; optionally include FILEEXT column based on `exportSelectedFormatColumns` flag
|
|
73
73
|
let visibleColumns = dataColumns.filter(col => {
|
|
74
74
|
if (!exportSelectedFormatColumns) {
|
|
75
75
|
return col.visible !== false && col.dataField !== "FILEEXT";
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
|
-
|
|
78
|
+
// Include FILEEXT even if not visible when exportSelectedFormatColumns is true
|
|
79
|
+
return col.visible !== false || col.dataField === "FILEEXT";
|
|
79
80
|
}
|
|
80
81
|
});
|
|
82
|
+
// If exportSelectedFormatColumns is true, move FILEEXT to be the first column (will be second after "Selected" column)
|
|
83
|
+
if (exportSelectedFormatColumns) {
|
|
84
|
+
const fileExtIndex = visibleColumns.findIndex(col => col.dataField === "FILEEXT");
|
|
85
|
+
if (fileExtIndex > 0) {
|
|
86
|
+
const [fileExtCol] = visibleColumns.splice(fileExtIndex, 1);
|
|
87
|
+
visibleColumns.unshift(fileExtCol);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
81
90
|
// Function to get the value for a column and its value in a row
|
|
82
91
|
const getValue = (col, value) => {
|
|
83
92
|
// Replace raw value with corresponding label from the map if applicable
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.21.0-dev3.
|
|
3
|
+
"version": "6.21.0-dev3.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -53,6 +53,9 @@
|
|
|
53
53
|
"styled-components": "^6.1.1"
|
|
54
54
|
},
|
|
55
55
|
"overrides": {
|
|
56
|
-
"esbuild": "^0.25.0"
|
|
56
|
+
"esbuild": "^0.25.0",
|
|
57
|
+
"devextreme-exceljs-fork": {
|
|
58
|
+
"archiver": "^8.0.0"
|
|
59
|
+
}
|
|
57
60
|
}
|
|
58
61
|
}
|