From f4bdddaa786de3a52105b19f5b85bb86312a8412 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 4 Dec 2024 20:14:21 +0100 Subject: [PATCH 1/2] fix gdt pagination --- frontend/src/components/GdtTransactionList.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/GdtTransactionList.vue b/frontend/src/components/GdtTransactionList.vue index 046482753..e6b4aa506 100644 --- a/frontend/src/components/GdtTransactionList.vue +++ b/frontend/src/components/GdtTransactionList.vue @@ -29,7 +29,7 @@ @@ -61,13 +60,16 @@ export default { }, data() { return { - currentPage: this.value, + currentPage: this.modelValue, link: 'https://gradido.net/' + this.$store.state.language + '/memberships/', } }, watch: { - currentPage() { - if (this.modelValue !== this.currentPage) this.$emit('input', this.currentPage) + modelValue(newValue) { + this.currentPage = newValue + }, + currentPage(newValue) { + if (this.modelValue !== newValue) this.$emit('update:modelValue', newValue) }, }, } From 7978d2f65ea14e7928f54f815e5198ce1cf437d2 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 16 Dec 2024 15:07:08 +0100 Subject: [PATCH 2/2] fix test --- frontend/src/components/GdtTransactionList.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/GdtTransactionList.spec.js b/frontend/src/components/GdtTransactionList.spec.js index b1b84f1f5..a8781419d 100644 --- a/frontend/src/components/GdtTransactionList.spec.js +++ b/frontend/src/components/GdtTransactionList.spec.js @@ -122,7 +122,7 @@ describe('GdtTransactionList', () => { it('emits input event after currentPage changes', async () => { await wrapper.findComponent({ name: 'BPagination' }).vm.$emit('update:modelValue', 2) await nextTick() - expect(wrapper.emitted('input')).toEqual([[2]]) + expect(wrapper.emitted('update:modelValue')).toEqual([[2]]) }) describe('pagination buttons', () => {