Scroll to top when pagination switches
This commit is contained in:
parent
64aa565182
commit
fa909db71c
2 changed files with 10 additions and 0 deletions
|
|
@ -134,7 +134,9 @@
|
|||
:prev-text="'Prev'"
|
||||
:next-text="'Next'"
|
||||
:page-class="'page-item'"
|
||||
:active-class="'uk-active'"
|
||||
:disabled-class="'uk-disabled'"
|
||||
:click-handler="scrollToTop()"
|
||||
>
|
||||
</Paginate>
|
||||
</div>
|
||||
|
|
@ -339,6 +341,10 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
scrollToTop() {
|
||||
document.querySelector("#container-left").scrollTop = 0;
|
||||
},
|
||||
|
||||
updateCaptures: function() {
|
||||
if (this.$store.state.available) {
|
||||
console.log("Updating capture list...");
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
:page-class="'page-item'"
|
||||
:active-class="'uk-active'"
|
||||
:disabled-class="'uk-disabled'"
|
||||
:click-handler="scrollToTop()"
|
||||
>
|
||||
</Paginate>
|
||||
</div>
|
||||
|
|
@ -109,6 +110,9 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
scrollToTop() {
|
||||
document.querySelector("#container-left").scrollTop = 0;
|
||||
},
|
||||
visibilityChanged(isVisible) {
|
||||
if (isVisible) {
|
||||
this.updateLogs();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue