@cdmx/wappler_ag_grid 0.2.6 → 0.2.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/README.md +2 -1
- package/app_connect/components.hjson +7 -2
- package/dmx-ag-grid.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,4 +15,5 @@ This Custom Module provides the below features:
|
|
|
15
15
|
12. Theme selection
|
|
16
16
|
13. Row Click Event Handling
|
|
17
17
|
14. Options to enable checkboxes for IDs for bulk select Operations
|
|
18
|
-
15. Options to enable Toggle Sliders for status fields
|
|
18
|
+
15. Options to enable Toggle Sliders for status fields
|
|
19
|
+
16. Added Action Buttons feature
|
|
@@ -22,7 +22,12 @@
|
|
|
22
22
|
"name": "data",
|
|
23
23
|
"title": "Data",
|
|
24
24
|
"type": "object"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "count",
|
|
28
|
+
"title": "Count",
|
|
29
|
+
"type": "number"
|
|
30
|
+
},
|
|
26
31
|
{
|
|
27
32
|
"name": "fields",
|
|
28
33
|
"title": "Fields",
|
|
@@ -560,7 +565,6 @@
|
|
|
560
565
|
"attribute": "dmx-bind:cnames",
|
|
561
566
|
"title": "Header Names",
|
|
562
567
|
"type": "grid",
|
|
563
|
-
"dataBindings": true,
|
|
564
568
|
"key": "field",
|
|
565
569
|
"jsonFormat": true,
|
|
566
570
|
"encloseBT": true,
|
|
@@ -579,6 +583,7 @@
|
|
|
579
583
|
field: "custom_name",
|
|
580
584
|
caption: "Name",
|
|
581
585
|
size: "20%",
|
|
586
|
+
dataBindings: true,
|
|
582
587
|
editable: {
|
|
583
588
|
type: "text"
|
|
584
589
|
},
|
package/dmx-ag-grid.js
CHANGED
|
@@ -2,6 +2,7 @@ dmx.Component('ag-grid', {
|
|
|
2
2
|
initialData: {
|
|
3
3
|
id: null,
|
|
4
4
|
data: {},
|
|
5
|
+
count: Number,
|
|
5
6
|
fields: {}
|
|
6
7
|
},
|
|
7
8
|
|
|
@@ -286,7 +287,7 @@ dmx.Component('ag-grid', {
|
|
|
286
287
|
function getValueGetter(key, dataChanges) {
|
|
287
288
|
return function (params) {
|
|
288
289
|
const value = params.data[key];
|
|
289
|
-
const matchingChange = dataChanges.find((change) => change.field === key && change.value === String(
|
|
290
|
+
const matchingChange = dataChanges.find((change) => change.field === key && change.value === String(value));
|
|
290
291
|
if (matchingChange) {
|
|
291
292
|
return matchingChange.new_value;
|
|
292
293
|
}
|
|
@@ -512,6 +513,7 @@ dmx.Component('ag-grid', {
|
|
|
512
513
|
|
|
513
514
|
const gridOptions = {
|
|
514
515
|
columnDefs: columnDefs,
|
|
516
|
+
noRowsOverlayComponent: '<div>No Records Found.</div>',
|
|
515
517
|
onRowClicked: enableRowClickEvent ? onRowClicked : undefined,
|
|
516
518
|
rowStyle: enableRowClickEvent ? { cursor: 'pointer' } : undefined,
|
|
517
519
|
defaultColDef: {
|
|
@@ -684,6 +686,7 @@ dmx.Component('ag-grid', {
|
|
|
684
686
|
},
|
|
685
687
|
|
|
686
688
|
update: function (props) {
|
|
689
|
+
this.set('count', this.props.data.length);
|
|
687
690
|
if (!dmx.equal(this.props.data, props.data)) {
|
|
688
691
|
this.refreshGrid();
|
|
689
692
|
}
|