tuain-ng-forms-lib 13.0.2 → 13.0.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.
@@ -997,12 +997,13 @@ class TableRecordData {
997
997
  getFieldValue(fieldCode) {
998
998
  return (fieldCode && this.recordData) ? this.recordData[fieldCode] : null;
999
999
  }
1000
- hasPattern(words) {
1000
+ hasPattern(words, columnObj) {
1001
1001
  if (!words || words.length === 0) {
1002
1002
  return true;
1003
1003
  }
1004
1004
  for (const fieldCode in this.recordData) {
1005
- if (this.recordData.hasOwnProperty(fieldCode)) {
1005
+ const columnDef = columnObj?.[fieldCode];
1006
+ if (columnDef && columnDef?.visible && this.recordData.hasOwnProperty(fieldCode)) {
1006
1007
  for (const word of words) {
1007
1008
  const term = word.toUpperCase();
1008
1009
  const fieldValue = this.recordData[fieldCode];
@@ -1342,7 +1343,7 @@ class RecordTable extends FormElement {
1342
1343
  filteredRecords = filteredRecords.filter(record => record.recordId === this.restrictedId);
1343
1344
  }
1344
1345
  if (this.globalFilterStrings.length > 0) {
1345
- filteredRecords = filteredRecords.filter(record => record.hasPattern(this.globalFilterStrings));
1346
+ filteredRecords = filteredRecords.filter(record => record.hasPattern(this.globalFilterStrings, this._tableColumnObj));
1346
1347
  }
1347
1348
  const columnFilters = this.columns.filter(column => column.filter).map(column => column.filter);
1348
1349
  if (columnFilters.length > 0) {