i-tech-shared-components 1.4.53 → 1.4.54

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.
@@ -678,14 +678,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
678
678
  }] } });
679
679
 
680
680
  class AutocompleteSelectComponent {
681
- /**
682
- * See AutocompleteConfigsInterface for available configurations.
683
- */
684
681
  set configs(data) {
685
- this.selectConfig = data;
686
682
  if (!data) {
683
+ this.selectConfig = data;
684
+ return;
685
+ }
686
+ // Generate a signature that works with functions
687
+ const signature = JSON.stringify(data, (key, value) => {
688
+ // Replace functions with a stable placeholder
689
+ return typeof value === 'function' ? '[Function]' : value;
690
+ });
691
+ // Stop if config hasn't actually changed
692
+ if (this._lastConfigSignature === signature) {
693
+ this.selectConfig = data; // Update reference but skip initialization
687
694
  return;
688
695
  }
696
+ // Config changed - proceed with initialization
697
+ this._lastConfigSignature = signature;
698
+ this.selectConfig = data;
689
699
  // Set default search strategy to 'backend' if not specified
690
700
  if (!this.selectConfig.searchStrategy) {
691
701
  this.selectConfig.searchStrategy = 'backend';
@@ -720,6 +730,7 @@ class AutocompleteSelectComponent {
720
730
  }
721
731
  constructor(inputService) {
722
732
  this.inputService = inputService;
733
+ this._lastConfigSignature = '';
723
734
  this.selectionChange = new EventEmitter();
724
735
  this.multiSelectSelectionChange = new EventEmitter();
725
736
  this.emitAction = new EventEmitter();
@@ -785,6 +796,9 @@ class AutocompleteSelectComponent {
785
796
  resetVariables() {
786
797
  this.defaultValueForFirst = '';
787
798
  this.showingValue = null;
799
+ this.accessToNextRequest = true;
800
+ this.pending = false;
801
+ this.requestLoading = false;
788
802
  this.defaultValue = null;
789
803
  if (this.searchInput?.nativeElement) {
790
804
  this.searchInput.nativeElement.value = '';