virtua 0.46.0 → 0.46.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/lib/core/index.cjs +1 -1
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/index.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/solid/index.cjs +1 -1
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +1 -1
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +5 -1
- package/lib/solid/index.jsx.map +1 -1
- package/lib/vue/index.cjs +1 -1
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +1 -1
- package/lib/vue/index.js.map +1 -1
- package/package.json +2 -2
package/lib/solid/index.jsx
CHANGED
|
@@ -526,6 +526,9 @@ const createVirtualStore = (elementsCount, itemSize = 40, ssrCount = 0, cacheSna
|
|
|
526
526
|
}
|
|
527
527
|
case ACTION_VIEWPORT_RESIZE: {
|
|
528
528
|
if (viewportSize !== payload) {
|
|
529
|
+
if (!viewportSize) {
|
|
530
|
+
shouldSync = true;
|
|
531
|
+
}
|
|
529
532
|
viewportSize = payload;
|
|
530
533
|
mutated = UPDATE_VIRTUAL_STATE + UPDATE_SIZE_EVENT;
|
|
531
534
|
}
|
|
@@ -1115,7 +1118,8 @@ const createWindowResizer = (store, isHorizontal) => {
|
|
|
1115
1118
|
store.$update(ACTION_VIEWPORT_RESIZE, window[windowSizeKey]);
|
|
1116
1119
|
};
|
|
1117
1120
|
window.addEventListener("resize", onWindowResize);
|
|
1118
|
-
|
|
1121
|
+
// https://github.com/inokawa/virtua/issues/792
|
|
1122
|
+
microtask(onWindowResize);
|
|
1119
1123
|
cleanupOnWindowResize = () => {
|
|
1120
1124
|
window.removeEventListener("resize", onWindowResize);
|
|
1121
1125
|
};
|