From b3c6513e7a843cd699fef0f3a1043cfa9a58d694 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Tue, 13 May 2025 11:26:00 -0700 Subject: [PATCH] Fix bug: Virtual Grid increments page size when no results left to render (#3877) --- src/components/common/VirtualGrid.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/common/VirtualGrid.vue b/src/components/common/VirtualGrid.vue index ace874954..a55f0bcc6 100644 --- a/src/components/common/VirtualGrid.vue +++ b/src/components/common/VirtualGrid.vue @@ -70,11 +70,12 @@ const state = computed(() => { const fromCol = fromRow * cols.value const toCol = toRow * cols.value const remainingCol = items.length - toCol + const hasMoreToRender = remainingCol >= 0 return { start: clamp(fromCol, 0, items?.length), end: clamp(toCol, fromCol, items?.length), - isNearEnd: remainingCol <= cols.value * bufferRows + isNearEnd: hasMoreToRender && remainingCol <= cols.value * bufferRows } }) const renderedItems = computed(() =>