@ascentgl/ads-ui 21.19.0 → 21.20.0

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.
@@ -2469,6 +2469,16 @@ class AbstractBaseComponent {
2469
2469
  if (changes.immediateValidation && !changes.immediateValidation.isFirstChange()) {
2470
2470
  this.ngAfterViewInit();
2471
2471
  }
2472
+ // If the policy changed at runtime, re-sync and (re)run validation accordingly.
2473
+ if (changes.skipValidationWhenEmpty && !changes.skipValidationWhenEmpty.isFirstChange()) {
2474
+ this.syncState();
2475
+ // When switching from true -> false, re-run validators so errors appear again if needed.
2476
+ if (!this.skipValidationWhenEmpty) {
2477
+ this.valueControl.updateValueAndValidity({ emitEvent: false });
2478
+ this.displayControl.updateValueAndValidity({ emitEvent: false });
2479
+ this.syncState();
2480
+ }
2481
+ }
2472
2482
  }
2473
2483
  /** @ignore */
2474
2484
  ngAfterViewInit() {