@brightspace-ui/core 2.119.0 → 2.119.1
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.
|
@@ -90,10 +90,11 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
90
90
|
|
|
91
91
|
this._handleItemMutation = this._handleItemMutation.bind(this);
|
|
92
92
|
this._handleResize = this._handleResize.bind(this);
|
|
93
|
+
this._itemObserver = new MutationObserver(this._handleItemMutation);
|
|
93
94
|
this._resizeObserver = new ResizeObserver((entries) => requestAnimationFrame(() => this._handleResize(entries)));
|
|
94
95
|
|
|
95
96
|
this._hasResized = false;
|
|
96
|
-
this.
|
|
97
|
+
this._isObservingResize = false;
|
|
97
98
|
this._itemHeight = 0;
|
|
98
99
|
this._mini = this.openerType === OPENER_TYPE.ICON;
|
|
99
100
|
this._overflowContainerHidden = false;
|
|
@@ -109,8 +110,8 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
109
110
|
disconnectedCallback() {
|
|
110
111
|
super.disconnectedCallback();
|
|
111
112
|
|
|
112
|
-
if (this.
|
|
113
|
-
this.
|
|
113
|
+
if (this._isObservingResize) {
|
|
114
|
+
this._isObservingResize = false;
|
|
114
115
|
this._resizeObserver.disconnect();
|
|
115
116
|
}
|
|
116
117
|
}
|
|
@@ -147,8 +148,8 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
147
148
|
update(changedProperties) {
|
|
148
149
|
super.update(changedProperties);
|
|
149
150
|
|
|
150
|
-
if (!this.
|
|
151
|
-
this.
|
|
151
|
+
if (!this._isObservingResize) {
|
|
152
|
+
this._isObservingResize = true;
|
|
152
153
|
this._resizeObserver.observe(this.shadowRoot.querySelector('.d2l-overflow-group-container'));
|
|
153
154
|
}
|
|
154
155
|
|
|
@@ -370,8 +371,7 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
370
371
|
await this._getItems();
|
|
371
372
|
|
|
372
373
|
this._slotItems.forEach(item => {
|
|
373
|
-
|
|
374
|
-
observer.observe(item, {
|
|
374
|
+
this._itemObserver.observe(item, {
|
|
375
375
|
attributes: true, /* required for legacy-Edge, otherwise attributeFilter throws a syntax error */
|
|
376
376
|
attributeFilter: ['disabled', 'text', 'selected'],
|
|
377
377
|
childList: false,
|
|
@@ -387,4 +387,5 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
387
387
|
this.requestUpdate();
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
|
+
|
|
390
391
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.1",
|
|
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",
|