@cdmx/wappler_ag_grid 1.8.14 → 1.8.16
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 +9 -0
- package/dmx-ag-grid.js +15 -5
- package/package.json +1 -1
|
@@ -3041,6 +3041,15 @@
|
|
|
3041
3041
|
}
|
|
3042
3042
|
]
|
|
3043
3043
|
},
|
|
3044
|
+
{
|
|
3045
|
+
addTitle: 'Destroy',
|
|
3046
|
+
title : 'Destroy',
|
|
3047
|
+
name : 'destroyGrid',
|
|
3048
|
+
icon : 'fa fa-lg fa-trash',
|
|
3049
|
+
state : 'opened',
|
|
3050
|
+
help: 'Destroy the AG Grid',
|
|
3051
|
+
properties : []
|
|
3052
|
+
},
|
|
3044
3053
|
{
|
|
3045
3054
|
addTitle: 'Export',
|
|
3046
3055
|
title: 'Export',
|
package/dmx-ag-grid.js
CHANGED
|
@@ -278,6 +278,12 @@ dmx.Component('ag-grid', {
|
|
|
278
278
|
this.set('gridInstance', gridInstance);
|
|
279
279
|
}, this);
|
|
280
280
|
},
|
|
281
|
+
destroyGrid: function () {
|
|
282
|
+
dmx.nextTick(function() {
|
|
283
|
+
var gridInstance = this.get('gridInstance');
|
|
284
|
+
if (gridInstance) gridInstance.destroy();
|
|
285
|
+
}, this);
|
|
286
|
+
},
|
|
281
287
|
exportGrid: function (Csv, Pdf) {
|
|
282
288
|
// Default Csv to true if both Csv and Pdf are false
|
|
283
289
|
if (!Csv && !Pdf) {
|
|
@@ -461,7 +467,7 @@ dmx.Component('ag-grid', {
|
|
|
461
467
|
const cwidths = this.props.cwidths
|
|
462
468
|
const ctypes = this.props.ctypes
|
|
463
469
|
if (!this.$node || !rowData || rowData.length === 0) {
|
|
464
|
-
console.error('No row data provided.')
|
|
470
|
+
console.error('No row data provided.')
|
|
465
471
|
return;
|
|
466
472
|
}
|
|
467
473
|
let gridInstance = this.get('gridInstance') ? this.get('gridInstance') : null;
|
|
@@ -2261,11 +2267,15 @@ dmx.Component('ag-grid', {
|
|
|
2261
2267
|
}
|
|
2262
2268
|
|
|
2263
2269
|
/* Ensure to/from, next/previous are visible */
|
|
2264
|
-
.ag-paging-row-summary-panel
|
|
2270
|
+
.ag-paging-row-summary-panel {
|
|
2271
|
+
display: inline-block;
|
|
2272
|
+
width: 100%; /* Ensure it takes full width */
|
|
2273
|
+
justify-content: space-between;
|
|
2274
|
+
text-align: center;
|
|
2275
|
+
}
|
|
2265
2276
|
.ag-paging-page-summary-panel {
|
|
2266
|
-
display:
|
|
2277
|
+
display: flex;
|
|
2267
2278
|
width: 100%; /* Ensure it takes full width */
|
|
2268
|
-
flex-wrap: wrap;
|
|
2269
2279
|
justify-content: space-between;
|
|
2270
2280
|
text-align: center;
|
|
2271
2281
|
}
|
|
@@ -2274,7 +2284,7 @@ dmx.Component('ag-grid', {
|
|
|
2274
2284
|
|
|
2275
2285
|
const paginationPanelStyle = document.createElement('style');
|
|
2276
2286
|
paginationPanelStyle.innerHTML = paginationPanelCss;
|
|
2277
|
-
document.appendChild(paginationPanelStyle);
|
|
2287
|
+
document.head.appendChild(paginationPanelStyle);
|
|
2278
2288
|
|
|
2279
2289
|
// Return grid instance
|
|
2280
2290
|
return gridInstance;
|