@ascentgl/ads-ui 21.114.3 → 21.114.4

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.
@@ -4160,6 +4160,7 @@ class AdsInputDropdownComponent extends AbstractInputComponent {
4160
4160
  }
4161
4161
  /** @ignore */
4162
4162
  ngOnChanges(changes) {
4163
+ super.ngOnChanges(changes);
4163
4164
  if (changes.options && this.autoSelectSingleDropdownOption) {
4164
4165
  asapScheduler.schedule(() => {
4165
4166
  if (this.dropdownComponent?.displayedOptions.size === 1) {
@@ -5827,6 +5828,8 @@ class AdsDatetimepickerComponent extends AbstractInputComponent {
5827
5828
  }
5828
5829
  /** @ignore */
5829
5830
  canShowError() {
5831
+ if (!this.showValidationError)
5832
+ return false;
5830
5833
  return !!this.displayControl.errors && (this.displayControl.touched || this.immediateValidation);
5831
5834
  }
5832
5835
  /** @ignore */
@@ -11433,6 +11436,14 @@ class AdsTimeFieldComponent extends AdsInputDropdownComponent {
11433
11436
  /** @ignore */
11434
11437
  ngOnChanges(changes) {
11435
11438
  super.ngOnChanges(changes);
11439
+ // When immediateValidation is turned on, re-sync validators and revalidate
11440
+ // so dynamically added validators (e.g. Validators.required) surface errors.
11441
+ if (changes.immediateValidation && !changes.immediateValidation.isFirstChange() && this.immediateValidation) {
11442
+ if (!this.militaryTime()) {
11443
+ this.syncValidators();
11444
+ }
11445
+ this.valueControl.updateValueAndValidity({ emitEvent: false });
11446
+ }
11436
11447
  // When validation-suppression is turned off, revalidate internal controls too.
11437
11448
  if (changes.skipValidationWhenEmpty && !changes.skipValidationWhenEmpty.isFirstChange() && !this.skipValidationWhenEmpty) {
11438
11449
  this.valueControl.updateValueAndValidity({ emitEvent: false });