1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-06-15 00:05:15 +02:00

Correctly handle browser back/forward navigation with pagination

This commit is contained in:
Ralph Slooten
2024-06-07 14:05:50 +12:00
parent 8a6d71ed9c
commit 7105450cc7
7 changed files with 56 additions and 40 deletions

View File

@ -11,8 +11,6 @@ export default {
total: Number,
},
emits: ['loadMessages'],
data() {
return {
pagination,
@ -44,13 +42,11 @@ export default {
methods: {
changeLimit: function () {
pagination.start = 0
this.$emit('loadMessages')
this.updateQueryParams()
},
viewNext: function () {
pagination.start = parseInt(pagination.start, 10) + parseInt(pagination.limit, 10)
this.$emit('loadMessages')
this.updateQueryParams()
},
@ -60,7 +56,6 @@ export default {
s = 0
}
pagination.start = s
this.$emit('loadMessages')
this.updateQueryParams()
},