Fix bug: Virtual Grid increments page size when no results left to render (#3877)

This commit is contained in:
Christian Byrne
2025-05-13 11:26:00 -07:00
committed by GitHub
parent a9bdc70e28
commit b3c6513e7a

View File

@@ -70,11 +70,12 @@ const state = computed<GridState>(() => {
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(() =>