@cdmx/wappler_ag_grid 0.7.0 → 0.7.1
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.
- package/dmx-ag-grid.js +29 -4
- package/package.json +1 -1
package/dmx-ag-grid.js
CHANGED
|
@@ -32,6 +32,8 @@ dmx.Component('ag-grid', {
|
|
|
32
32
|
suppress_movable_columns: { type: Boolean, default: false },
|
|
33
33
|
enable_cell_expressions: { type: Boolean, default: false },
|
|
34
34
|
animate_rows: { type: Boolean, default: false },
|
|
35
|
+
always_show_horizontal_scroll: { type: Boolean, default: true },
|
|
36
|
+
always_show_vertical_scroll: { type: Boolean, default: false },
|
|
35
37
|
suppress_agg_func_in_header: { type: Boolean, default: false },
|
|
36
38
|
suppress_agg_at_root_level: { type: Boolean, default: false },
|
|
37
39
|
suppress_clipboard_paste: { type: Boolean, default: false },
|
|
@@ -1016,10 +1018,33 @@ dmx.Component('ag-grid', {
|
|
|
1016
1018
|
exportGridData = () => {
|
|
1017
1019
|
const excludedColumnIds = ['checkboxColumn', 'actionsColumn'];
|
|
1018
1020
|
// Extracting fields and colIds from columnDefs
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1021
|
+
let fieldsAndColIds;
|
|
1022
|
+
if (options.group_config) {
|
|
1023
|
+
// Helper function to traverse grouped column structure
|
|
1024
|
+
const traverseColumns = (columns) => {
|
|
1025
|
+
const fieldsAndColIds = [];
|
|
1026
|
+
columns.forEach((column) => {
|
|
1027
|
+
if (column.children) {
|
|
1028
|
+
fieldsAndColIds.push(...traverseColumns(column.children));
|
|
1029
|
+
} else {
|
|
1030
|
+
fieldsAndColIds.push({
|
|
1031
|
+
field: column.field,
|
|
1032
|
+
colId: column.colId,
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
1036
|
+
return fieldsAndColIds;
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
// Traverse columnDefs to gather fields and colIds
|
|
1040
|
+
fieldsAndColIds = traverseColumns(gridConfig.columnDefs);
|
|
1041
|
+
|
|
1042
|
+
} else {
|
|
1043
|
+
fieldsAndColIds = gridConfig.columnDefs.map((column) => ({
|
|
1044
|
+
field: column.field,
|
|
1045
|
+
colId: column.colId,
|
|
1046
|
+
}));
|
|
1047
|
+
}
|
|
1023
1048
|
// Filtering out fields based on excludedColumnIds
|
|
1024
1049
|
const fieldsToExport = fieldsAndColIds.filter(
|
|
1025
1050
|
(column) => !excludedColumnIds.includes(column.colId)
|