@vaadin/virtual-list 24.6.0 → 24.6.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/package.json +9 -9
- package/src/vaadin-virtual-list-mixin.js +20 -25
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/virtual-list",
|
|
3
|
-
"version": "24.6.
|
|
3
|
+
"version": "24.6.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,21 +39,21 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/component-base": "~24.6.
|
|
43
|
-
"@vaadin/lit-renderer": "~24.6.
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "~24.6.
|
|
45
|
-
"@vaadin/vaadin-material-styles": "~24.6.
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "~24.6.
|
|
42
|
+
"@vaadin/component-base": "~24.6.2",
|
|
43
|
+
"@vaadin/lit-renderer": "~24.6.2",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "~24.6.2",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "~24.6.2",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "~24.6.2",
|
|
47
47
|
"lit": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "~24.6.
|
|
51
|
-
"@vaadin/testing-helpers": "^1.
|
|
50
|
+
"@vaadin/chai-plugins": "~24.6.2",
|
|
51
|
+
"@vaadin/testing-helpers": "^1.1.0",
|
|
52
52
|
"sinon": "^18.0.0"
|
|
53
53
|
},
|
|
54
54
|
"web-types": [
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "ee2ea01a17d888403adb141515a0a3cef82b8b65"
|
|
59
59
|
}
|
|
@@ -65,7 +65,7 @@ export const VirtualListMixin = (superClass) =>
|
|
|
65
65
|
|
|
66
66
|
constructor() {
|
|
67
67
|
super();
|
|
68
|
-
this.
|
|
68
|
+
this.__onDocumentDragStart = this.__onDocumentDragStart.bind(this);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/** @protected */
|
|
@@ -89,17 +89,13 @@ export const VirtualListMixin = (superClass) =>
|
|
|
89
89
|
/** @protected */
|
|
90
90
|
connectedCallback() {
|
|
91
91
|
super.connectedCallback();
|
|
92
|
-
|
|
93
|
-
// that have children with massive heights. This workaround prevents crashes
|
|
94
|
-
// and performance issues by excluding the items from the drag image.
|
|
95
|
-
// https://github.com/vaadin/web-components/issues/7985
|
|
96
|
-
document.addEventListener('dragstart', this.__onDragStart, { capture: true });
|
|
92
|
+
document.addEventListener('dragstart', this.__onDocumentDragStart, { capture: true });
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
/** @protected */
|
|
100
96
|
disconnectedCallback() {
|
|
101
97
|
super.disconnectedCallback();
|
|
102
|
-
document.removeEventListener('dragstart', this.
|
|
98
|
+
document.removeEventListener('dragstart', this.__onDocumentDragStart, { capture: true });
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
/**
|
|
@@ -153,25 +149,24 @@ export const VirtualListMixin = (superClass) =>
|
|
|
153
149
|
}
|
|
154
150
|
}
|
|
155
151
|
|
|
156
|
-
/**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
this.style.
|
|
152
|
+
/**
|
|
153
|
+
* Webkit-based browsers have issues with generating drag images
|
|
154
|
+
* for elements that have children with massive heights. Chromium
|
|
155
|
+
* browsers crash, while Safari experiences significant performance
|
|
156
|
+
* issues. To mitigate these issues, we hide the items container
|
|
157
|
+
* when drag starts to remove it from the drag image.
|
|
158
|
+
*
|
|
159
|
+
* Related issues:
|
|
160
|
+
* - https://github.com/vaadin/web-components/issues/7985
|
|
161
|
+
* - https://issues.chromium.org/issues/383356871
|
|
162
|
+
*
|
|
163
|
+
* @private
|
|
164
|
+
*/
|
|
165
|
+
__onDocumentDragStart(e) {
|
|
166
|
+
if (e.target.contains(this) && this.scrollHeight > 20000) {
|
|
167
|
+
this.$.items.style.display = 'none';
|
|
172
168
|
requestAnimationFrame(() => {
|
|
173
|
-
this.$.items.style.
|
|
174
|
-
this.style.overflow = initialVirtualListOverflow;
|
|
169
|
+
this.$.items.style.display = '';
|
|
175
170
|
});
|
|
176
171
|
}
|
|
177
172
|
}
|
package/web-types.json
CHANGED