@brightspace-ui/core 3.44.1 → 3.44.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.
@@ -735,6 +735,12 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
735
735
  _handleClear() {
736
736
  const dimension = this._getActiveDimension();
737
737
 
738
+ if (dimension.searchType !== 'none') {
739
+ this._handleClearSearch(dimension);
740
+ const searchInput = this.shadowRoot.querySelector('d2l-input-search');
741
+ if (searchInput) searchInput.value = '';
742
+ }
743
+
738
744
  this._performDimensionClear(dimension);
739
745
  this._dispatchChangeEventNow(false);
740
746
  this.requestUpdate();
@@ -743,20 +749,33 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
743
749
  }
744
750
 
745
751
  _handleClearAll() {
752
+ let hasSearch = false;
746
753
  this._dimensions.forEach(dimension => {
747
- if (dimension.searchType !== 'none' && dimension.searchValue !== '') {
748
- dimension.searchValue = '';
749
- this._search(dimension);
754
+ if (dimension.searchType !== 'none') {
755
+ this._handleClearSearch(dimension);
756
+ hasSearch = true;
750
757
  }
751
758
  this._performDimensionClear(dimension);
752
759
  });
753
760
 
761
+ if (hasSearch) {
762
+ const searchInputs = this.shadowRoot.querySelectorAll('d2l-input-search');
763
+ searchInputs?.forEach((searchInput) => searchInput.value = '');
764
+ }
765
+
754
766
  this._dispatchChangeEventNow(true);
755
767
  this.requestUpdate();
756
768
 
757
769
  this.text ? announce(this.localize('components.filter.clearAllAnnounceOverride', { filterText: this.text })) : announce(this.localize('components.filter.clearAllAnnounce'));
758
770
  }
759
771
 
772
+ _handleClearSearch(dimension) {
773
+ if (dimension.searchValue === '') return;
774
+
775
+ dimension.searchValue = '';
776
+ this._search(dimension);
777
+ }
778
+
760
779
  _handleDimensionDataChange(e) {
761
780
  const changes = e.detail.changes;
762
781
  const dimension = this._getDimensionByKey(e.detail.dimensionKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.44.1",
3
+ "version": "3.44.2",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",