Skip to content
Snippets Groups Projects
Commit 5fd5c2c6 authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

correct pagination search when user is not on the first page

parent 78c34415
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ export default {
},
methods: {
goto(i, e) {
e.preventDefault()
if (e !== undefined) e.preventDefault()
this.$emit("update:currentPage", i)
},
firstPage: function (e) {
......@@ -94,6 +94,13 @@ export default {
return [this.currentPage - 1, this.currentPage, this.currentPage + 1]
}
},
watch: {
arrayLength: {
handler(n, o) {
this.goto(1)
}
}
}
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment