@cdmx/wappler_ag_grid 1.5.11 → 1.5.13
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/README.md +6 -5
- package/app_connect/components.hjson +8 -0
- package/dmx-ag-grid.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,11 +72,12 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
|
|
|
72
72
|
35. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
|
|
73
73
|
36. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
|
|
74
74
|
37. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
|
|
75
|
-
38. **
|
|
76
|
-
39. **
|
|
77
|
-
40. **Row
|
|
78
|
-
41. **
|
|
79
|
-
42. **Enable Row
|
|
75
|
+
38. **ID Present**: Uses ID field data for performing transactional updates on the Grid. Required to be enabled when perfomring transaction updates (Reload on Grid). (Default: false)
|
|
76
|
+
39. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
|
|
77
|
+
40. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
|
|
78
|
+
41. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
|
|
79
|
+
42. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
80
|
+
43. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
80
81
|
|
|
81
82
|
# Data Type Overrides
|
|
82
83
|
|
|
@@ -539,6 +539,14 @@
|
|
|
539
539
|
"defaultValue": false,
|
|
540
540
|
"help": "Hides the ID Field in Grid"
|
|
541
541
|
},
|
|
542
|
+
{
|
|
543
|
+
"name": "idPreset",
|
|
544
|
+
"attribute": "dmx-bind:id_present",
|
|
545
|
+
"title": "ID Present",
|
|
546
|
+
"type": "boolean",
|
|
547
|
+
"defaultValue": false,
|
|
548
|
+
"help": "Uses ID field data for performing transactional updates on the Grid. Required to be enabled when perfomring transaction updates (Reload on Grid)"
|
|
549
|
+
},
|
|
542
550
|
{
|
|
543
551
|
"name": "numericColumnAlign",
|
|
544
552
|
"attribute": "dmx-bind:numeric_column_align",
|
package/dmx-ag-grid.js
CHANGED
|
@@ -57,6 +57,7 @@ dmx.Component('ag-grid', {
|
|
|
57
57
|
suppress_scroll_on_new_data: { type: Boolean, default: false },
|
|
58
58
|
suppress_property_names_check: { type: Boolean, default: false },
|
|
59
59
|
hide_id_field: { type: Boolean, default: false },
|
|
60
|
+
id_present: { type: Boolean, default: false },
|
|
60
61
|
numeric_column_align: { type: Boolean, default: false },
|
|
61
62
|
enable_rtl: { type: Boolean, default: false },
|
|
62
63
|
locale_text: { type: String, default: null },
|
|
@@ -272,7 +273,7 @@ dmx.Component('ag-grid', {
|
|
|
272
273
|
});
|
|
273
274
|
const newRowData = this.props.data;
|
|
274
275
|
let transaction;
|
|
275
|
-
|
|
276
|
+
|
|
276
277
|
if (oldRowData && oldRowData.length > 0) {
|
|
277
278
|
const addedRows = newRowData.filter(newRow => !oldRowData.some(oldRow => newRow.id === oldRow.id));
|
|
278
279
|
const removedRows = oldRowData.filter(oldRow => !newRowData.some(newRow => oldRow.id === newRow.id));
|
|
@@ -507,6 +508,7 @@ dmx.Component('ag-grid', {
|
|
|
507
508
|
const container = document.createElement('div');
|
|
508
509
|
container.style.display = 'flex';
|
|
509
510
|
container.style.flexWrap = 'wrap';
|
|
511
|
+
container.style.paddingTop = '3px';
|
|
510
512
|
buttons.forEach((buttonConfig) => {
|
|
511
513
|
const button = document.createElement('button');
|
|
512
514
|
button.classList.add('btn');
|
|
@@ -515,7 +517,7 @@ dmx.Component('ag-grid', {
|
|
|
515
517
|
button.setAttribute('data-toggle', 'tooltip');
|
|
516
518
|
// Call a function to get the dynamic tooltip content
|
|
517
519
|
if (buttonConfig.tooltip.endsWith('()')) {
|
|
518
|
-
const tooltipFunction = buttonConfig.tooltip.slice(0, -2);
|
|
520
|
+
const tooltipFunction = buttonConfig.tooltip.slice(0, -2);
|
|
519
521
|
const tooltipText = window[tooltipFunction](params.data)
|
|
520
522
|
button.setAttribute('title', tooltipText);
|
|
521
523
|
} else {
|
|
@@ -1290,6 +1292,7 @@ dmx.Component('ag-grid', {
|
|
|
1290
1292
|
localeText = AG_GRID_LOCALE_PT
|
|
1291
1293
|
}
|
|
1292
1294
|
const gridOptions = {
|
|
1295
|
+
...(options.id_present ? { getRowId: params => params.data.id } : {}),
|
|
1293
1296
|
columnDefs: (groupedColumnDefs && groupedColumnDefs.length > 0) ? groupedColumnDefs : columnDefs,
|
|
1294
1297
|
localeText: localeText,
|
|
1295
1298
|
enableRtl: options.enable_rtl,
|
|
@@ -1330,7 +1333,6 @@ dmx.Component('ag-grid', {
|
|
|
1330
1333
|
suppressPropertyNamesCheck: this.props.suppress_property_names_check,
|
|
1331
1334
|
suppressRowDeselection: this.props.suppress_row_deselection,
|
|
1332
1335
|
columnHoverHighlight: this.props.column_hover_highlight,
|
|
1333
|
-
getRowId: (params) => params.data.id,
|
|
1334
1336
|
onFilterModified: function (params) {
|
|
1335
1337
|
const columnApi = params.columnApi.api;
|
|
1336
1338
|
columnApi.hideOverlay();
|