Commit 7dd9b0dd authored by Phil Hughes's avatar Phil Hughes

Resets the page & the scrolling when filters are updated

parent 23328425
...@@ -19,6 +19,7 @@ ...@@ -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 @@ ...@@ -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;
...@@ -46,7 +56,7 @@ ...@@ -46,7 +56,7 @@
// Remove the new dom element & let vue add the element // Remove the new dom element & let vue add the element
e.item.parentNode.removeChild(e.item); e.item.parentNode.removeChild(e.item);
BoardsStore.moveCardToList(fromListId, toListId, issueId); BoardsStore.moveCardToList(fromListId, toListId, issueId);
} }
}, gl.boardSortableDefaultOptions); }, gl.boardSortableDefaultOptions);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment