tuain-ng-forms-lib 15.1.5 → 15.1.7

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.
@@ -156,9 +156,11 @@ class FieldComponent extends ElementComponent {
156
156
  }
157
157
  // Subscripción a cambios en atributos
158
158
  this.field?.attributeChange.subscribe(event => {
159
- const { name: componentAttr, value } = event;
160
- this.defaultProcessAttributeChange(componentAttr, value);
161
- this.customProcessAttributeChange(componentAttr, value);
159
+ const { name: componentAttr, value = null } = event ?? {};
160
+ if (componentAttr) {
161
+ this.defaultProcessAttributeChange(componentAttr, value);
162
+ this.customProcessAttributeChange(componentAttr, value);
163
+ }
162
164
  });
163
165
  if (this.field) {
164
166
  this.field.widget = this;
@@ -260,9 +262,11 @@ class SectionComponent extends PieceComponent {
260
262
  }
261
263
  // Subscripción a cambios en atributos
262
264
  this.section?.attributeChange.subscribe(event => {
263
- const { name: attrName, value } = event;
264
- this.defaultProcessAttributeChange(attrName, value);
265
- this.customProcessAttributeChange(attrName, value);
265
+ const { name: attrName, value = null } = event ?? {};
266
+ if (attrName) {
267
+ this.defaultProcessAttributeChange(attrName, value);
268
+ this.customProcessAttributeChange(attrName, value);
269
+ }
266
270
  });
267
271
  this.start();
268
272
  }
@@ -294,9 +298,11 @@ class SubSectionComponent extends PieceComponent {
294
298
  }
295
299
  // Subscripción a cambios en atributos
296
300
  this.subSection?.attributeChange.subscribe(event => {
297
- const { name: attrName, value } = event;
298
- this.defaultProcessAttributeChange(attrName, value);
299
- this.customProcessAttributeChange(attrName, value);
301
+ const { name: attrName, value = null } = event ?? {};
302
+ if (attrName) {
303
+ this.defaultProcessAttributeChange(attrName, value);
304
+ this.customProcessAttributeChange(attrName, value);
305
+ }
300
306
  });
301
307
  this.start();
302
308
  }
@@ -442,9 +448,11 @@ class LibTableComponent extends ElementComponent {
442
448
  }
443
449
  // Subscripción a cambios en atributos
444
450
  this.table?.attributeChange.subscribe(event => {
445
- const { name: attrName, value } = event;
446
- this.defaultProcessAttributeChange(attrName, value);
447
- this.customProcessAttributeChange(attrName, value);
451
+ const { name: attrName, value = null } = event ?? {};
452
+ if (attrName) {
453
+ this.defaultProcessAttributeChange(attrName, value);
454
+ this.customProcessAttributeChange(attrName, value);
455
+ }
448
456
  });
449
457
  this.start();
450
458
  }