Skip to content

Commit 2e55ed3

Browse files
authored
fix(virtual): skip items update if height has not been checked (#21442)
fixes #18806
1 parent a9d0c56 commit 2e55ed3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vuetify/src/composables/virtual.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export function useVirtual <T> (props: VirtualProps, items: Ref<readonly T[]>) {
197197
raf = requestAnimationFrame(_calculateVisibleItems)
198198
}
199199
function _calculateVisibleItems () {
200-
if (!containerRef.value || !viewportHeight.value) return
200+
if (!containerRef.value || !viewportHeight.value || !itemHeight.value) return
201201
const scrollTop = lastScrollTop - markerOffset
202202
const direction = Math.sign(scrollVelocity)
203203

0 commit comments

Comments
 (0)