@cdmx/wappler_ag_grid 1.8.7 → 1.8.8

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 +8 -6
  2. package/package.json +1 -1
package/dmx-ag-grid.js CHANGED
@@ -279,7 +279,10 @@ dmx.Component('ag-grid', {
279
279
  }, this);
280
280
  },
281
281
  exportGrid: function (Csv, Pdf) {
282
- if (!Csv && !Pdf) return;
282
+ // Default Csv to true if both Csv and Pdf are false
283
+ if (!Csv && !Pdf) {
284
+ Csv = true;
285
+ }
283
286
  dmx.nextTick(() => {
284
287
  const exportFunction = Csv ? exportGridData : (Pdf ? exportGridDataToPDF : null);
285
288
  if (typeof exportFunction === 'function') {
@@ -1727,11 +1730,10 @@ dmx.Component('ag-grid', {
1727
1730
  console.error(`Grid container element with ID '${options.id}'-grid not found.`);
1728
1731
  return;
1729
1732
  }
1730
-
1731
- // if (gridInstance) {
1732
- // gridInstance.destroy();
1733
- // gridInstance = null;
1734
- // }
1733
+ if (gridInstance) {
1734
+ gridInstance.destroy();
1735
+ gridInstance = null;
1736
+ }
1735
1737
  const getPageId = () => {
1736
1738
  const currentPageUrl = window.location.origin + window.location.pathname;
1737
1739
  const optionsId = options.id+'-grid';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.8.7",
3
+ "version": "1.8.8",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",