@brightspace-ui/core 2.14.7 → 2.14.8

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.
@@ -94,6 +94,7 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
94
94
  this._contentReady = false;
95
95
  this._hasResized = false;
96
96
  this._itemHeight = 0;
97
+ this._listContainerObserver = null;
97
98
  this._resizeObserver = null;
98
99
  this._showHiddenTags = false;
99
100
  }
@@ -101,6 +102,7 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
101
102
  disconnectedCallback() {
102
103
  super.disconnectedCallback();
103
104
  if (this._clearButtonResizeObserver) this._clearButtonResizeObserver.disconnect();
105
+ if (this._listContainerObserver) this._listContainerObserver.disconnect();
104
106
  if (this._resizeObserver) this._resizeObserver.disconnect();
105
107
  if (this._subtleButtonResizeObserver) this._subtleButtonResizeObserver.disconnect();
106
108
  }
@@ -114,16 +116,20 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
114
116
  });
115
117
  this._subtleButtonResizeObserver.observe(subtleButton);
116
118
 
117
- const container = this.shadowRoot.querySelector('.tag-list-outer-container');
118
- this._resizeObserver = new ResizeObserver((e) => requestAnimationFrame(() => this._handleResize(e)));
119
- this._resizeObserver.observe(container);
120
-
121
119
  const clearButton = this.shadowRoot.querySelector('d2l-button-subtle.d2l-tag-list-clear-button');
122
120
  this._clearButtonResizeObserver = new ResizeObserver(() => {
123
121
  this._clearButtonWidth = Math.ceil(parseFloat(getComputedStyle(clearButton).getPropertyValue('width')));
124
122
  this._clearButtonHeight = Math.ceil(parseFloat(getComputedStyle(clearButton).getPropertyValue('height')));
125
123
  });
126
124
  this._clearButtonResizeObserver.observe(clearButton);
125
+
126
+ const container = this.shadowRoot.querySelector('.tag-list-outer-container');
127
+ this._resizeObserver = new ResizeObserver((e) => requestAnimationFrame(() => this._handleResize(e)));
128
+ this._resizeObserver.observe(container);
129
+
130
+ const listContainer = this.shadowRoot.querySelector('.tag-list-container');
131
+ this._listContainerObserver = new ResizeObserver(() => requestAnimationFrame(() => this._handleSlotChange()));
132
+ this._listContainerObserver.observe(listContainer);
127
133
  }
128
134
 
129
135
  render() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.14.7",
3
+ "version": "2.14.8",
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",