fix: refs #7353 load on scroll end #841

Merged
jorgep merged 3 commits from 7353-fixLoadOnScroll into dev 2024-10-18 08:16:21 +00:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 0c2d9e6ec6 - Show all commits

View File

@ -325,7 +325,8 @@ function handleOnDataSaved(_) {
function handleScroll() { function handleScroll() {
const tMiddle = tableRef.value.$el.querySelector('.q-table__middle'); const tMiddle = tableRef.value.$el.querySelector('.q-table__middle');
const isAtBottom = tMiddle.scrollHeight - tMiddle.scrollTop === tMiddle.clientHeight; const { scrollHeight, scrollTop, clientHeight } = tMiddle;
const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40;
if (isAtBottom) CrudModelRef.value.vnPaginateRef.paginate(); if (isAtBottom) CrudModelRef.value.vnPaginateRef.paginate();
} }
</script> </script>