@cdmx/wappler_ag_grid 1.8.7 → 1.8.9
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 +13 -10
- 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
|
|
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') {
|
|
@@ -1589,6 +1592,11 @@ dmx.Component('ag-grid', {
|
|
|
1589
1592
|
},
|
|
1590
1593
|
onGridReady: (params) => {
|
|
1591
1594
|
const columnApi = params.api;
|
|
1595
|
+
if (options.loading_overlay) {
|
|
1596
|
+
setTimeout(() => {
|
|
1597
|
+
columnApi.setGridOption("loading", false)
|
|
1598
|
+
}, options.loading_overlay_duration);
|
|
1599
|
+
}
|
|
1592
1600
|
if (options.csort && options.csort.length > 0) {
|
|
1593
1601
|
let sortModel = options.csort.map(function(sortItem, index) {
|
|
1594
1602
|
return {
|
|
@@ -1727,11 +1735,10 @@ dmx.Component('ag-grid', {
|
|
|
1727
1735
|
console.error(`Grid container element with ID '${options.id}'-grid not found.`);
|
|
1728
1736
|
return;
|
|
1729
1737
|
}
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
// }
|
|
1738
|
+
if (gridInstance) {
|
|
1739
|
+
gridInstance.destroy();
|
|
1740
|
+
gridInstance = null;
|
|
1741
|
+
}
|
|
1735
1742
|
const getPageId = () => {
|
|
1736
1743
|
const currentPageUrl = window.location.origin + window.location.pathname;
|
|
1737
1744
|
const optionsId = options.id+'-grid';
|
|
@@ -1762,11 +1769,7 @@ dmx.Component('ag-grid', {
|
|
|
1762
1769
|
gridInstance.setGridOption('rowData', rowData)
|
|
1763
1770
|
if (options.loading_overlay) {
|
|
1764
1771
|
gridInstance.setGridOption("loading", true)
|
|
1765
|
-
setTimeout(() => {
|
|
1766
|
-
gridInstance.hideOverlay()
|
|
1767
|
-
}, options.loading_overlay_duration);
|
|
1768
1772
|
}
|
|
1769
|
-
|
|
1770
1773
|
if (options.cfilters && options.cfilters.length > 0) {
|
|
1771
1774
|
var filterModel = {};
|
|
1772
1775
|
const customFilters = options.cfilters
|