Merge branch 'master' into humhub_use_first_name_instead_username_field

This commit is contained in:
einhornimmond 2024-12-20 20:19:34 +01:00 committed by GitHub
commit 2c342267ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View File

@ -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', () => {

View File

@ -29,7 +29,7 @@
</div>
<BPagination
v-if="transactionGdtCount > pageSize"
:model-value="currentPage"
v-model="currentPage"
class="mt-3"
pills
size="lg"
@ -37,7 +37,6 @@
:total-rows="transactionGdtCount"
align="center"
:hide-ellipsis="true"
@update:model-value="currentPage = $event"
/>
</div>
</template>
@ -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)
},
},
}