diff --git a/public/plugins/vue/tt-components/tt-table.js b/public/plugins/vue/tt-components/tt-table.js
index 7e0bcc7d2..1834e2b31 100644
--- a/public/plugins/vue/tt-components/tt-table.js
+++ b/public/plugins/vue/tt-components/tt-table.js
@@ -172,7 +172,7 @@ Vue.component('tt-table', {
style="height: 150px">
Laden... |
-
+
@@ -467,7 +467,6 @@ Vue.component('tt-table', {
} else if (this.columns[key] && this.columns[key].filter === 'date') {
parsedRow[this.columns[key].text] = this.moment(row[key]).format('DD.MM.YYYY HH:mm');
} else {
- console.log(key)
parsedRow[this.columns[key].text] = row[key];
}
@@ -480,8 +479,8 @@ Vue.component('tt-table', {
let data = typeof this.config.customExcelProcessor === 'function' ?
- this.config.customExcelProcessor(JSON.parse(JSON.stringify(this.rawRows))) :
- defaultExcelProcessor.call(this, JSON.parse(JSON.stringify(this.rawRows)));
+ this.config.customExcelProcessor(JSON.parse(JSON.stringify(this.computedRows))) :
+ defaultExcelProcessor.call(this, JSON.parse(JSON.stringify(this.computedRows)));
const ws = this.window.XLSX.utils.json_to_sheet(data);
@@ -777,16 +776,19 @@ Vue.component('tt-table', {
});
}
-
// console.timeEnd('Filtering and pagination');
+ return output;
+ },
+ visibleRows() {
+ if (!this.rawRows || this.ssr === true) return null;
// Pagination and slice logic
- this.pagination.total_pages = Math.ceil(output.length / this.pagination.per_page);
- this.pagination.filtered_available = output.length;
+ this.pagination.total_pages = Math.ceil(this.computedRows.length / this.pagination.per_page);
+ this.pagination.filtered_available = this.computedRows.length;
const perPage = this.pagination.per_page;
const page = this.pagination.page;
const startIndex = (page - 1) * perPage;
const endIndex = startIndex + perPage;
- this.rows = output.slice(startIndex, Math.min(endIndex, output.length));
+ this.rows = this.computedRows.slice(startIndex, Math.min(endIndex, this.computedRows.length));
return this.rows;
}