Commit 90b9e1a3 authored by Justin Ho's avatar Justin Ho

Reset the current page to 1 on tab / sort change

When opening a different tab (for example, from Open
to Closed), we should reset the page to 1 to avoid
showing "No results found" page when there are less
issues in a particular tab.

The same applies to sort since it doesn't make sense
to sort a list but leave you on page 2 (which might be in
the middle of the list).
parent 5179afec
......@@ -135,12 +135,14 @@ export default {
});
},
onIssuableListClickTab(selectedIssueState) {
this.currentPage = 1;
this.currentState = selectedIssueState;
},
onIssuableListPageChange(selectedPage) {
this.currentPage = selectedPage;
},
onIssuableListSort(selectedSort) {
this.currentPage = 1;
this.sortedBy = selectedSort;
},
onIssuableListFilter(filters = []) {
......
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