@cdmx/wappler_ag_grid 1.3.1 → 1.3.3
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 +3 -2
- package/dmx-ag-grid.js +27 -12
- package/package.json +1 -1
package/dmx-ag-grid.js
CHANGED
|
@@ -748,7 +748,7 @@ dmx.Component('ag-grid', {
|
|
|
748
748
|
hasText = true;
|
|
749
749
|
} else if (!isNaN(Number(value)) && !(typeof value === "string")) {
|
|
750
750
|
hasNumber = true;
|
|
751
|
-
} else if (
|
|
751
|
+
} else if ((new Date(value)).getTime() > 0) {
|
|
752
752
|
hasDate = true;
|
|
753
753
|
} else {
|
|
754
754
|
hasText = true;
|
|
@@ -1431,17 +1431,17 @@ dmx.Component('ag-grid', {
|
|
|
1431
1431
|
gridInstance = agGrid.createGrid(gridDiv, gridConfig);
|
|
1432
1432
|
|
|
1433
1433
|
if (options.cfilters && options.cfilters.length > 0) {
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1434
|
+
var filterModel = {};
|
|
1435
|
+
const customFilters = options.cfilters
|
|
1436
|
+
customFilters.forEach(function (customFilter) {
|
|
1437
|
+
filterModel[customFilter.field] = {
|
|
1438
|
+
type: customFilter.type,
|
|
1439
|
+
filter: customFilter.filter
|
|
1440
|
+
};
|
|
1441
|
+
});
|
|
1442
|
+
gridInstance.setFilterModel(filterModel);
|
|
1443
|
+
gridInstance.onFilterChanged();
|
|
1444
|
+
}
|
|
1445
1445
|
|
|
1446
1446
|
const gridElement = document.getElementById(options.id+'-grid');
|
|
1447
1447
|
if (options.compact_view) {
|
|
@@ -1690,5 +1690,20 @@ dmx.Component('ag-grid', {
|
|
|
1690
1690
|
let gridInstance = this.refreshGrid();
|
|
1691
1691
|
this.set('gridInstance', gridInstance);
|
|
1692
1692
|
}
|
|
1693
|
+
if (!dmx.equal(this.props.cfilters, props.cfilters)){
|
|
1694
|
+
let gridInstance = this.get('gridInstance');
|
|
1695
|
+
if (this.props.cfilters && this.props.cfilters.length > 0) {
|
|
1696
|
+
var filterModel = {};
|
|
1697
|
+
const customFilters = this.props.cfilters;
|
|
1698
|
+
customFilters.forEach(function (customFilter) {
|
|
1699
|
+
filterModel[customFilter.field] = {
|
|
1700
|
+
type: customFilter.type,
|
|
1701
|
+
filter: customFilter.filter,
|
|
1702
|
+
};
|
|
1703
|
+
});
|
|
1704
|
+
gridInstance.setFilterModel(filterModel);
|
|
1705
|
+
gridInstance.onFilterChanged();
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1693
1708
|
},
|
|
1694
1709
|
});
|