@cdmx/wappler_ag_grid 1.5.0 → 1.5.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.
Files changed (2) hide show
  1. package/dmx-ag-grid.js +9 -3
  2. package/package.json +1 -1
package/dmx-ag-grid.js CHANGED
@@ -1404,21 +1404,27 @@ dmx.Component('ag-grid', {
1404
1404
  const uniqueValuesToCount = new Set(colObj.unique_values.split(','));
1405
1405
  result[0][col] = 0;
1406
1406
  const uniqueValues = new Set();
1407
+ const totalValues = new Set();
1407
1408
 
1408
1409
  rowData.forEach(function (line) {
1409
1410
  const value = line.data[col];
1410
1411
  if (line.index < rowData.length && value !== undefined && value !== null) {
1411
1412
  const valueString = value.toString();
1412
- if (options.columns_to_count_nonunique || uniqueValuesToCount.has(valueString)) {
1413
+ if (uniqueValuesToCount.has(valueString)) {
1413
1414
  result[0][col]++;
1415
+ totalValues.add(valueString);
1414
1416
  if (!uniqueValues.has(valueString)) {
1415
1417
  uniqueValues.add(valueString);
1416
1418
  }
1417
1419
  }
1418
1420
  }
1419
1421
  });
1420
-
1421
- result[0][col + '_unique_count'] = uniqueValues.size;
1422
+ if (options.columns_to_count_nonunique) {
1423
+ result[0][col + '_total_count'] = totalValues.size;
1424
+ }
1425
+ else {
1426
+ result[0][col] = uniqueValues.size;
1427
+ }
1422
1428
  });
1423
1429
  }
1424
1430
  api.setGridOption('pinnedBottomRowData', result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",