diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 5a30f4d53..05bc6edeb 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -134,6 +134,7 @@ const splittedColumns = ref({ columns: [] }); const columnsVisibilitySkipped = ref(); const createForm = ref(); const tableFilterRef = ref([]); +const tableRef = ref(); const tableModes = [ { @@ -321,6 +322,12 @@ function handleOnDataSaved(_) { if (_.onDataSaved) _.onDataSaved({ CrudModelRef: CrudModelRef.value }); else $props.create.onDataSaved(_); } + +function handleScroll() { + const tMiddle = tableRef.value.$el.querySelector('.q-table__middle'); + const isAtBottom = tMiddle.scrollHeight - tMiddle.scrollTop === tMiddle.clientHeight; + if (isAtBottom) CrudModelRef.value.vnPaginateRef.paginate(); +}