@cdmx/wappler_ag_grid 1.8.2 → 1.8.3
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/app_connect/components.hjson +1 -1
- package/dmx-ag-grid.js +11 -4
- package/package.json +1 -1
|
@@ -2511,7 +2511,7 @@
|
|
|
2511
2511
|
dataBindings: true, defaultValue: true, required: false,
|
|
2512
2512
|
help: 'Export Grid data as CSV file.'
|
|
2513
2513
|
},
|
|
2514
|
-
{
|
|
2514
|
+
{
|
|
2515
2515
|
name: '2', optionName: '2', title: 'PDF', type: 'boolean',
|
|
2516
2516
|
dataBindings: true, defaultValue: false, required: false,
|
|
2517
2517
|
help: 'Export Grid data as PDF file.'
|
package/dmx-ag-grid.js
CHANGED
|
@@ -2040,11 +2040,18 @@ dmx.Component('ag-grid', {
|
|
|
2040
2040
|
api: gridInstance,
|
|
2041
2041
|
};
|
|
2042
2042
|
const cellStyle = applyCellStyle(params);
|
|
2043
|
+
// Determine the header name using cnames and humanize function
|
|
2044
|
+
const headerName = isHeader ? (
|
|
2045
|
+
cnames.hasOwnProperty(field) ?
|
|
2046
|
+
cnames[field].custom_name :
|
|
2047
|
+
humanize(field)
|
|
2048
|
+
) : '';
|
|
2043
2049
|
return {
|
|
2044
|
-
text: isHeader ?
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2050
|
+
text: !isHeader ? (
|
|
2051
|
+
(colDef.cellRenderer && typeof colDef.cellRenderer === 'function') ? colDef.cellRenderer(params) :
|
|
2052
|
+
(colDef.valueFormatter && typeof colDef.valueFormatter === 'function') ? colDef.valueFormatter(params) :
|
|
2053
|
+
gridInstance.getValue(column, gridInstance.getDisplayedRowAtIndex(0)) ?? ''
|
|
2054
|
+
) : headerName,
|
|
2048
2055
|
color: cellStyle?.color ?? 'black',
|
|
2049
2056
|
fillColor: cellStyle?.backgroundColor ? cellStyle.backgroundColor.replace('#', '') : undefined,
|
|
2050
2057
|
};
|