tuain-ng-forms-lib 12.0.68 → 12.0.69

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.
@@ -775,7 +775,7 @@
775
775
  HAS: 'HAS',
776
776
  NOTHAS: 'NOTHAS',
777
777
  BETWEEN: 'BETWEEN',
778
- IN: 'IN'
778
+ IN: 'IN',
779
779
  };
780
780
 
781
781
  var FormElement = /** @class */ (function () {
@@ -1555,6 +1555,7 @@
1555
1555
  _this._actionsObj = {};
1556
1556
  _this.tableRecords = [];
1557
1557
  _this.globalSearch = false;
1558
+ _this.restrictedId = null;
1558
1559
  _this.tableTitle = tableReceived.tableTitle;
1559
1560
  _this._appendPages = (_a = tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.append) !== null && _a !== void 0 ? _a : false;
1560
1561
  _this.selectable = (_b = tableReceived === null || tableReceived === void 0 ? void 0 : tableReceived.selectable) !== null && _b !== void 0 ? _b : false;
@@ -1840,6 +1841,14 @@
1840
1841
  });
1841
1842
  };
1842
1843
  // Filtros
1844
+ RecordTable.prototype.setFilterById = function (id) {
1845
+ this.restrictedId = id;
1846
+ this.updateVisibleRecords();
1847
+ };
1848
+ RecordTable.prototype.cleanIdFilter = function () {
1849
+ this.restrictedId = null;
1850
+ this.updateVisibleRecords();
1851
+ };
1843
1852
  RecordTable.prototype.setGlobalFilterString = function (text) {
1844
1853
  var _a;
1845
1854
  this.globalFilterStrings = (_a = text.split(' ').filter(function (t) { return t && t.trim().length > 0; }).map(function (t) { return t.trim(); })) !== null && _a !== void 0 ? _a : [];
@@ -1854,6 +1863,9 @@
1854
1863
  RecordTable.prototype.getFilteredRecords = function () {
1855
1864
  var _this = this;
1856
1865
  var filteredRecords = this.tableRecords;
1866
+ if (this.restrictedId) {
1867
+ filteredRecords = filteredRecords.filter(function (record) { return record.recordId === _this.restrictedId; });
1868
+ }
1857
1869
  if (this.globalFilterStrings.length > 0) {
1858
1870
  filteredRecords = filteredRecords.filter(function (record) { return record.hasPattern(_this.globalFilterStrings); });
1859
1871
  }