@cdmx/wappler_ag_grid 1.5.6 → 1.5.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.
- package/app_connect/components.hjson +17 -0
- package/dmx-ag-grid.js +17 -3
- package/package.json +1 -1
|
@@ -316,6 +316,14 @@
|
|
|
316
316
|
"defaultValue": "dd/MM/yyyy hh:mm A",
|
|
317
317
|
"help": "Date Format"
|
|
318
318
|
},
|
|
319
|
+
{
|
|
320
|
+
"name": "quickFilterField",
|
|
321
|
+
"attribute": "quick_filter_field",
|
|
322
|
+
"title": "Filter Field ID",
|
|
323
|
+
"type": "text",
|
|
324
|
+
"defaultValue": "search_field",
|
|
325
|
+
"help": "Specifies the field ID of the search field when using grid quick filter"
|
|
326
|
+
},
|
|
319
327
|
{
|
|
320
328
|
"name": "loadingOverlay",
|
|
321
329
|
"attribute": "dmx-bind:loading_overlay",
|
|
@@ -2324,6 +2332,15 @@
|
|
|
2324
2332
|
state: 'opened',
|
|
2325
2333
|
help: 'Get Selected Rows',
|
|
2326
2334
|
properties: []
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
addTitle: 'quickFilter',
|
|
2338
|
+
title: 'Quick Filter',
|
|
2339
|
+
name: 'quickFilter',
|
|
2340
|
+
icon: 'fas fa-lg fa-search',
|
|
2341
|
+
state: 'opened',
|
|
2342
|
+
help: 'Quick Search',
|
|
2343
|
+
properties: []
|
|
2327
2344
|
}
|
|
2328
2345
|
],
|
|
2329
2346
|
"children": [],
|
package/dmx-ag-grid.js
CHANGED
|
@@ -71,6 +71,7 @@ dmx.Component('ag-grid', {
|
|
|
71
71
|
filter: { type: Boolean, default: true },
|
|
72
72
|
floating_filter: { type: Boolean, default: true },
|
|
73
73
|
column_hover_highlight: { type: Boolean, default: true },
|
|
74
|
+
quick_filter_field: { type: String, default: 'search_field' },
|
|
74
75
|
export_to_csv: { type: Boolean, default: true },
|
|
75
76
|
export_csv_filename: { type: String, default: 'export.csv' },
|
|
76
77
|
fixed_header: { type: Boolean, default: false },
|
|
@@ -241,6 +242,9 @@ dmx.Component('ag-grid', {
|
|
|
241
242
|
},
|
|
242
243
|
getSelectedRows: function () {
|
|
243
244
|
exportSelectedRows();
|
|
245
|
+
},
|
|
246
|
+
quickFilter: function () {
|
|
247
|
+
onFilterTextBoxChanged();
|
|
244
248
|
}
|
|
245
249
|
},
|
|
246
250
|
|
|
@@ -501,7 +505,8 @@ dmx.Component('ag-grid', {
|
|
|
501
505
|
const buttons = params.buttons || defaultButtons;
|
|
502
506
|
// Create a new container element to hold the buttons
|
|
503
507
|
const container = document.createElement('div');
|
|
504
|
-
|
|
508
|
+
container.style.display = 'flex';
|
|
509
|
+
container.style.flexWrap = 'wrap';
|
|
505
510
|
buttons.forEach((buttonConfig) => {
|
|
506
511
|
const button = document.createElement('button');
|
|
507
512
|
button.classList.add('btn');
|
|
@@ -1196,6 +1201,7 @@ dmx.Component('ag-grid', {
|
|
|
1196
1201
|
cellRenderer: actionsRendererForPinnedBottom,
|
|
1197
1202
|
minWidth: options.actions_column_min_width,
|
|
1198
1203
|
maxWidth: options.actions_column_max_width,
|
|
1204
|
+
autoHeight: true,
|
|
1199
1205
|
pinned: (options.pin_actions ? options.actions_column_position: undefined),
|
|
1200
1206
|
cellRendererParams: {
|
|
1201
1207
|
buttons: [],
|
|
@@ -1473,7 +1479,7 @@ dmx.Component('ag-grid', {
|
|
|
1473
1479
|
gridConfig.onFirstDataRendered = function (e) {
|
|
1474
1480
|
totalRow(e.api, columnsToSum, columnsToCount);
|
|
1475
1481
|
};
|
|
1476
|
-
gridConfig.postSortRows = function (e) {
|
|
1482
|
+
gridConfig.postSortRows = function (e) {
|
|
1477
1483
|
totalRow(e.api, columnsToSum, columnsToCount);
|
|
1478
1484
|
};
|
|
1479
1485
|
}
|
|
@@ -1486,7 +1492,7 @@ gridConfig.postSortRows = function (e) {
|
|
|
1486
1492
|
gridInstance.hideOverlay()
|
|
1487
1493
|
}, options.loading_overlay_duration);
|
|
1488
1494
|
}
|
|
1489
|
-
|
|
1495
|
+
|
|
1490
1496
|
if (options.cfilters && options.cfilters.length > 0) {
|
|
1491
1497
|
var filterModel = {};
|
|
1492
1498
|
const customFilters = options.cfilters
|
|
@@ -1587,6 +1593,14 @@ gridConfig.postSortRows = function (e) {
|
|
|
1587
1593
|
const selectedRows = gridInstance.getSelectedRows();
|
|
1588
1594
|
this.set('selectedRows', selectedRows);
|
|
1589
1595
|
}
|
|
1596
|
+
onFilterTextBoxChanged = () => {
|
|
1597
|
+
if (gridInstance) {
|
|
1598
|
+
gridInstance.setGridOption(
|
|
1599
|
+
'quickFilterText',
|
|
1600
|
+
document.getElementById(options.quick_filter_field).value
|
|
1601
|
+
);
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1590
1604
|
function updateHoveringBarStyles() {
|
|
1591
1605
|
const existingStyle = document.getElementById('hovering-bar-style');
|
|
1592
1606
|
if (options.fixed_horizontal_scroll) {
|