Resets the page & the scrolling when filters are updated
This commit is contained in:
parent
233284254c
commit
7dd9b0dd3c
2 changed files with 13 additions and 2 deletions
|
@ -19,6 +19,7 @@
|
||||||
},
|
},
|
||||||
'filters': {
|
'filters': {
|
||||||
handler: function () {
|
handler: function () {
|
||||||
|
this.list.page = 1;
|
||||||
this.list.getIssues(true);
|
this.list.getIssues(true);
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
|
|
|
@ -10,9 +10,19 @@
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
scrollOffset: 250,
|
scrollOffset: 250,
|
||||||
loadingMore: false
|
loadingMore: false,
|
||||||
|
filters: BoardsStore.state.filters
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'filters': {
|
||||||
|
handler: function () {
|
||||||
|
this.loadingMore = false;
|
||||||
|
this.$els.list.scrollTop = 0;
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
listHeight: function () {
|
listHeight: function () {
|
||||||
return this.$els.list.getBoundingClientRect().height;
|
return this.$els.list.getBoundingClientRect().height;
|
||||||
|
|
Loading…
Reference in a new issue