@unifylib/ui-lib 1.2.5 → 1.2.6

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.
@@ -2327,6 +2327,7 @@ class BaseFormCanvasComponent {
2327
2327
  return;
2328
2328
  if (!this.formParam) {
2329
2329
  this.formParam = this.fb.group(buildFormFields(this.fields, this.defaults));
2330
+ this.patchDisabledFormValidity();
2330
2331
  // Emit initial form reference
2331
2332
  this.formUpdated.next(this.formParam);
2332
2333
  // Emit on every value change so parent components can react live
@@ -2354,6 +2355,17 @@ class BaseFormCanvasComponent {
2354
2355
  }
2355
2356
  }
2356
2357
  this.formParam.patchValue(patchValues, { emitEvent: false });
2358
+ this.patchDisabledFormValidity();
2359
+ }
2360
+ patchDisabledFormValidity() {
2361
+ const form = this.formParam;
2362
+ if (!form) {
2363
+ return;
2364
+ }
2365
+ Object.defineProperty(form, 'valid', {
2366
+ get: () => form.status === 'DISABLED' || form.status === 'VALID',
2367
+ configurable: true
2368
+ });
2357
2369
  }
2358
2370
  resetFilterFormValues() {
2359
2371
  if (!this.formParam || !this.fields?.length) {