Skip to content

Commit 08550fd

Browse files
authored
fix(VVirtualScroll): show more than 1 element when min height is 0 (#22420)
1 parent c5ae129 commit 08550fd

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

packages/vuetify/src/composables/virtual.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,12 @@ export function useVirtual <T> (props: VirtualProps, items: Ref<readonly T[]>) {
149149
let lastScrollTime = 0
150150

151151
watch(viewportHeight, (val, oldVal) => {
152-
if (oldVal) {
153-
calculateVisibleItems()
154-
if (val < oldVal) {
155-
requestAnimationFrame(() => {
156-
scrollVelocity = 0
157-
calculateVisibleItems()
158-
})
159-
}
152+
calculateVisibleItems()
153+
if (val < oldVal) {
154+
requestAnimationFrame(() => {
155+
scrollVelocity = 0
156+
calculateVisibleItems()
157+
})
160158
}
161159
})
162160

0 commit comments

Comments
 (0)