i-tech-shared-components 1.4.81 → 1.4.82-alpha.1777959755742

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.
@@ -787,6 +787,18 @@ class AutocompleteSelectComponent {
787
787
  this.resetVariables();
788
788
  }
789
789
  });
790
+ // Handle the case where patchValue was called on the form control before this
791
+ // subscription was ready (e.g., in a parent's ngOnChanges before the template rendered).
792
+ // In that scenario the valueChanges emission is lost, so we check the current value here.
793
+ const existingValue = this.ngControl.control?.value;
794
+ if (existingValue && !this.showingValue) {
795
+ if (this.data?.length) {
796
+ this.findAndSetDefaultValueFromData();
797
+ }
798
+ else {
799
+ this.isNeededForRecall = true;
800
+ }
801
+ }
790
802
  }
791
803
  hardReload() {
792
804
  this.getData('', true);