fix: trigger continuous load condition earlier

This commit is contained in:
Christoph Kluge 2024-04-15 10:36:26 +02:00
parent 9b261a4778
commit 79b08a181d

View File

@ -157,7 +157,8 @@
clientHeight
} = document.documentElement;
if (scrollTop + clientHeight >= scrollHeight && $jobsStore.data != null && $jobsStore.data.jobs.hasNextPage) {
// Add 100 px offset to trigger load earlier
if (scrollTop + clientHeight >= scrollHeight - 100 && $jobsStore.data != null && $jobsStore.data.jobs.hasNextPage) {
let pendingPaging = { ...paging }
scrollMultiplier += 1
pendingPaging.itemsPerPage = itemsPerPage * scrollMultiplier