fixed pagination issue

This commit is contained in:
Luca Haid
2025-03-11 18:00:30 +01:00
parent a6ab876bf0
commit af8573c929

View File

@@ -779,6 +779,9 @@ Vue.component('tt-table', {
// Pagination and slice logic
this.pagination.total_pages = Math.ceil(this.computedRows.length / this.pagination.per_page);
this.pagination.filtered_available = this.computedRows.length;
if (this.pagination.page > this.pagination.total_pages) {
this.pagination.page = this.pagination.total_pages;
}
const perPage = this.pagination.per_page;
const page = this.pagination.page;
const startIndex = (page - 1) * perPage;