@vaadin/component-base 24.6.6 → 24.6.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "24.6.
|
|
3
|
+
"version": "24.6.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"lit": "^3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vaadin/chai-plugins": "~24.6.
|
|
42
|
-
"@vaadin/test-runner-commands": "~24.6.
|
|
41
|
+
"@vaadin/chai-plugins": "~24.6.8",
|
|
42
|
+
"@vaadin/test-runner-commands": "~24.6.8",
|
|
43
43
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
44
44
|
"sinon": "^18.0.0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "86defcc88fe7764611823369f19d41345513e54a"
|
|
47
47
|
}
|
package/src/define.js
CHANGED
|
@@ -13,7 +13,7 @@ function dashToCamelCase(dash) {
|
|
|
13
13
|
|
|
14
14
|
const experimentalMap = {};
|
|
15
15
|
|
|
16
|
-
export function defineCustomElement(CustomElement, version = '24.6.
|
|
16
|
+
export function defineCustomElement(CustomElement, version = '24.6.8') {
|
|
17
17
|
Object.defineProperty(CustomElement, 'version', {
|
|
18
18
|
get() {
|
|
19
19
|
return version;
|
package/src/slot-styles-mixin.js
CHANGED
|
@@ -180,6 +180,16 @@ export class IronListAdapter {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
hostConnected() {
|
|
184
|
+
// Restore scroll position, which is reset when host is removed from DOM,
|
|
185
|
+
// since virtualizer doesn't re-render when adding it to the DOM again.
|
|
186
|
+
// If the scroll target isn't visible and its `offsetParent` is `null`, wait
|
|
187
|
+
// for the ResizeObserver to handle this case (hiding -> moving -> showing).
|
|
188
|
+
if (this.scrollTarget.offsetParent && this.scrollTarget.scrollTop !== this._scrollPosition) {
|
|
189
|
+
this.scrollTarget.scrollTop = this._scrollPosition;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
183
193
|
update(startIndex = 0, endIndex = this.size - 1) {
|
|
184
194
|
const updatedElements = [];
|
|
185
195
|
this.__getVisibleElements().forEach((el) => {
|
package/src/virtualizer.js
CHANGED
|
@@ -80,4 +80,13 @@ export class Virtualizer {
|
|
|
80
80
|
flush() {
|
|
81
81
|
this.__adapter.flush();
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Notifies the virtualizer about its host element connected to the DOM.
|
|
86
|
+
*
|
|
87
|
+
* @method hostConnected
|
|
88
|
+
*/
|
|
89
|
+
hostConnected() {
|
|
90
|
+
this.__adapter.hostConnected();
|
|
91
|
+
}
|
|
83
92
|
}
|