virtua 0.53.0 → 0.53.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.
- package/lib/angular/VMasonry.d.ts +6 -1
- package/lib/angular/index.js +78 -60
- package/lib/angular/index.js.map +1 -1
- package/lib/index.cjs +48 -41
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +103 -96
- package/lib/index.js.map +1 -1
- package/lib/react/VMasonry.d.ts +4 -0
- package/lib/solid/VMasonry.d.ts +4 -0
- package/lib/solid/index.cjs +8 -2
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +8 -2
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +17 -3
- package/lib/solid/index.jsx.map +1 -1
- package/lib/svelte/VMasonry.svelte +19 -5
- package/lib/svelte/VMasonry.type.d.ts +4 -0
- package/lib/vue/VMasonry.d.ts +4 -0
- package/lib/vue/index.cjs +14 -7
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +14 -7
- package/lib/vue/index.js.map +1 -1
- package/package.json +1 -1
package/lib/solid/index.jsx
CHANGED
|
@@ -2107,6 +2107,7 @@ var VMasonry = (props) => {
|
|
|
2107
2107
|
"gap",
|
|
2108
2108
|
"itemSize",
|
|
2109
2109
|
"bufferSize",
|
|
2110
|
+
"keepMounted",
|
|
2110
2111
|
"cache",
|
|
2111
2112
|
"onScroll",
|
|
2112
2113
|
"onScrollEnd",
|
|
@@ -2184,9 +2185,22 @@ var VMasonry = (props) => {
|
|
|
2184
2185
|
});
|
|
2185
2186
|
const items = [];
|
|
2186
2187
|
const indexes = [];
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2188
|
+
if (props.keepMounted) {
|
|
2189
|
+
const mounted = new Set(props.keepMounted);
|
|
2190
|
+
for (let [i, j] = range(); i <= j; i++) {
|
|
2191
|
+
mounted.add(i);
|
|
2192
|
+
}
|
|
2193
|
+
sort([...mounted]).forEach((index) => {
|
|
2194
|
+
if (index < count) {
|
|
2195
|
+
items.push(props.data[index]);
|
|
2196
|
+
indexes.push(index);
|
|
2197
|
+
}
|
|
2198
|
+
});
|
|
2199
|
+
} else {
|
|
2200
|
+
for (let [i, j] = range(); i <= j; i++) {
|
|
2201
|
+
items.push(props.data[i]);
|
|
2202
|
+
indexes.push(i);
|
|
2203
|
+
}
|
|
2190
2204
|
}
|
|
2191
2205
|
return {
|
|
2192
2206
|
_items: items,
|