@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.
@@ -1430,9 +1430,10 @@
1430
1430
  {
1431
1431
  "field": "filter",
1432
1432
  "caption": "Filter Value",
1433
+ "dataBindings": true,
1433
1434
  "editable": {
1434
- "type": "text"
1435
- }
1435
+ "type": "datapicker"
1436
+ }
1436
1437
  }
1437
1438
  ],
1438
1439
  "newRecord": {
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 (moment(value, moment.ISO_8601, true).isValid()) {
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
- 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
- }
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",