tuain-ng-forms-lib 13.0.6 → 13.0.9

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.
@@ -1007,7 +1007,7 @@ class TableRecordData {
1007
1007
  for (const word of words) {
1008
1008
  const term = word.toUpperCase();
1009
1009
  let fieldValue;
1010
- if (columnDef.fieldType.toUpper().includes('DATE')) {
1010
+ if (columnDef.fieldType.toUpperCase().includes('DATE')) {
1011
1011
  fieldValue = this.recordData[fieldCode].substring(0, 16);
1012
1012
  }
1013
1013
  else {
@@ -1417,8 +1417,8 @@ class RecordTable extends FormElement {
1417
1417
  this.updateVisibleRecords();
1418
1418
  }
1419
1419
  recordCompare(recordA, recordB, columnCompare, direction) {
1420
- const recordAColumn = recordA.getFieldValue(columnCompare);
1421
- const recordBColumn = recordB.getFieldValue(columnCompare);
1420
+ const recordAColumn = recordA.getFieldValue(columnCompare).toLocaleLowerCase();
1421
+ const recordBColumn = recordB.getFieldValue(columnCompare).toLocaleLowerCase();
1422
1422
  let result = 0;
1423
1423
  if (recordAColumn < recordBColumn) {
1424
1424
  result = -1;
@@ -1504,6 +1504,7 @@ class RecordFormSection {
1504
1504
  this._activation = new Subject();
1505
1505
  this._inactivation = new Subject();
1506
1506
  this.active = false;
1507
+ this.customAttributes = {};
1507
1508
  if (!sectionReceived) {
1508
1509
  return;
1509
1510
  }
@@ -1539,7 +1540,10 @@ class RecordFormSection {
1539
1540
  }
1540
1541
  }
1541
1542
  }
1542
- this.customAttributes = sectionReceived?.customAttributes ?? null;
1543
+ if (sectionReceived?.customAttributes) {
1544
+ Object.keys(sectionReceived?.customAttributes)
1545
+ ?.forEach(attr => this.customAttributes[attr] = sectionReceived?.customAttributes[attr]);
1546
+ }
1543
1547
  }
1544
1548
  getCustomAttribute(name) { return this.customAttributes?.[name] ?? null; }
1545
1549
  setCustomAttribute(name, value) { return name && (this.customAttributes[name] = value); }