diff --git a/frontend/src/components/PaginationButtons.vue b/frontend/src/components/PaginationButtons.vue index bf2c19488..708a92f40 100644 --- a/frontend/src/components/PaginationButtons.vue +++ b/frontend/src/components/PaginationButtons.vue @@ -1,8 +1,8 @@ diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 77aa78879..908b08fcc 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -84,13 +84,9 @@
{{ $t('transaction.nullTransactions') }} @@ -128,23 +124,6 @@ export default { transactionCount: { type: Number, default: 0 }, showPagination: { type: Boolean, default: false }, }, - watch: { - timestamp: { - immediate: true, - handler: 'updateTransactions', - }, - }, - computed: { - hasNext() { - return this.currentPage * this.pageSize < this.transactionCount - }, - hasPrevious() { - return this.currentPage > 1 - }, - totalPages() { - return Math.ceil(this.transactionCount / this.pageSize) - }, - }, methods: { updateTransactions() { this.$emit('update-transactions', { @@ -165,15 +144,14 @@ export default { throwError(msg) { throw new Error(msg) }, - showNext() { - this.currentPage++ + }, + watch: { + currentPage() { this.updateTransactions() - window.scrollTo(0, 0) }, - showPrevious() { - this.currentPage-- - this.updateTransactions() - window.scrollTo(0, 0) + timestamp: { + immediate: true, + handler: 'updateTransactions', }, }, } diff --git a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue index 8f1fd2839..7d1bcfd7e 100644 --- a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue @@ -28,12 +28,9 @@
@@ -73,25 +70,21 @@ export default { } = result this.transactionsGdt = listGDTEntries.gdtEntries this.transactionGdtCount = listGDTEntries.count + window.scrollTo(0, 0) }) .catch((error) => { this.$toasted.error(error.message) }) }, - showNext() { - this.currentPage++ - this.updateGdt() - window.scrollTo(0, 0) - }, - showPrevious() { - this.currentPage-- - this.updateGdt() - window.scrollTo(0, 0) - }, }, mounted() { this.updateGdt() }, + watch: { + currentPage() { + this.updateGdt() + }, + }, }