@smilodon/core 1.10.1 → 1.10.2

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.
package/dist/index.umd.js CHANGED
@@ -8153,6 +8153,11 @@
8153
8153
  }
8154
8154
  this._syncClearControlState();
8155
8155
  }
8156
+ _isActivelyEditingSearchInput() {
8157
+ return this._config.searchable === true
8158
+ && this._state.isOpen
8159
+ && this._shadow.activeElement === this._input;
8160
+ }
8156
8161
  _renderOptionsWithAnimation() {
8157
8162
  // Add fade-out animation
8158
8163
  this._optionsContainer.style.opacity = '0';
@@ -8462,7 +8467,7 @@
8462
8467
  const previousLength = this._state.loadedItems.length;
8463
8468
  this._rebuildItemRegistry(items);
8464
8469
  this._state.groupedItems = this._groupItemsByProperty(items);
8465
- if (!this._state.searchQuery)
8470
+ if (!this._state.searchQuery && !this._isActivelyEditingSearchInput())
8466
8471
  this._updateInputDisplay();
8467
8472
  const newLength = this._state.loadedItems.length;
8468
8473
  if (this._dataRequestCoordinator) {
@@ -8543,7 +8548,7 @@
8543
8548
  this._rebuildItemRegistry(groupedItems.flatMap(group => group.options));
8544
8549
  this._state.groupedItems = groupedItems;
8545
8550
  this._renderOptions();
8546
- if (!this._state.searchQuery)
8551
+ if (!this._state.searchQuery && !this._isActivelyEditingSearchInput())
8547
8552
  this._updateInputDisplay();
8548
8553
  }
8549
8554
  /**
@@ -8759,14 +8764,16 @@
8759
8764
  // Re-initialize observers in case infinite scroll was enabled/disabled
8760
8765
  this._initializeObservers();
8761
8766
  this._syncClearControlState();
8762
- this._updateInputDisplay();
8767
+ if (!this._isActivelyEditingSearchInput())
8768
+ this._updateInputDisplay();
8763
8769
  this._renderOptions();
8764
8770
  }
8765
8771
  else {
8766
8772
  this._syncInputContainerMode();
8767
8773
  this._syncMultiSelectDisplayConfig();
8768
8774
  this._syncClearControlState();
8769
- this._updateInputDisplay();
8775
+ if (!this._isActivelyEditingSearchInput())
8776
+ this._updateInputDisplay();
8770
8777
  }
8771
8778
  this._acknowledgedSearchMode = this._dataLoadingConfig.searchMode;
8772
8779
  if (this._dataLoadingConfig.protocol === 'legacy')
@@ -9579,7 +9586,9 @@
9579
9586
  this._acknowledgedProjectionFailureStageForTest = null;
9580
9587
  throw new Error('Injected acknowledged projection failure after publication');
9581
9588
  }
9582
- if (!this._state.searchQuery && this._acknowledgedPendingSearchQuery === null) {
9589
+ if (!this._state.searchQuery
9590
+ && this._acknowledgedPendingSearchQuery === null
9591
+ && !this._isActivelyEditingSearchInput()) {
9583
9592
  this._updateInputDisplay();
9584
9593
  }
9585
9594
  this._syncListboxAccessibility();