@cdmx/wappler_ag_grid 1.9.16 → 1.9.17
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 +8 -4
- package/package.json +1 -1
package/dmx-ag-grid.js
CHANGED
|
@@ -1741,13 +1741,17 @@ dmx.Component('ag-grid', {
|
|
|
1741
1741
|
columnsToSum.forEach(function (col) {
|
|
1742
1742
|
result[0][col] = 0;
|
|
1743
1743
|
rowData.forEach(function (line) {
|
|
1744
|
-
if (line.index < rowData.length) {
|
|
1745
|
-
|
|
1744
|
+
if (line.index < rowData.length && line.data[col] !== null && line.data[col] !== undefined) {
|
|
1745
|
+
// Convert to number and handle NaN
|
|
1746
|
+
const value = Number(line.data[col]);
|
|
1747
|
+
if (!isNaN(value)) {
|
|
1748
|
+
result[0][col] += value;
|
|
1749
|
+
}
|
|
1746
1750
|
}
|
|
1747
1751
|
});
|
|
1748
1752
|
// Apply footer sum precision if specified
|
|
1749
|
-
if (options.footer_sum_precision) {
|
|
1750
|
-
|
|
1753
|
+
if (options.footer_sum_precision !== null && !isNaN(result[0][col])) {
|
|
1754
|
+
result[0][col] = Number(result[0][col].toFixed(options.footer_sum_precision));
|
|
1751
1755
|
}
|
|
1752
1756
|
});
|
|
1753
1757
|
}
|