Commit a42cbe9c authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'justin_ho-update-url-params-on-jira-issues-list-page' into 'master'

Update urlParams on Jira issues list page

See merge request gitlab-org/gitlab!66054
parents 6c1f9d85 90b9e1a3
...@@ -74,10 +74,10 @@ export default { ...@@ -74,10 +74,10 @@ export default {
urlParams() { urlParams() {
return { return {
'labels[]': this.filterParams.labels, 'labels[]': this.filterParams.labels,
page: this.currentPage,
search: this.filterParams.search, search: this.filterParams.search,
sort: this.sortedBy, ...(this.currentPage === 1 ? {} : { page: this.currentPage }),
state: this.currentState, ...(this.sortedBy === this.initialSortBy ? {} : { sort: this.sortedBy }),
...(this.currentState === this.initialState ? {} : { state: this.currentState }),
}; };
}, },
}, },
...@@ -135,12 +135,14 @@ export default { ...@@ -135,12 +135,14 @@ export default {
}); });
}, },
onIssuableListClickTab(selectedIssueState) { onIssuableListClickTab(selectedIssueState) {
this.currentPage = 1;
this.currentState = selectedIssueState; this.currentState = selectedIssueState;
}, },
onIssuableListPageChange(selectedPage) { onIssuableListPageChange(selectedPage) {
this.currentPage = selectedPage; this.currentPage = selectedPage;
}, },
onIssuableListSort(selectedSort) { onIssuableListSort(selectedSort) {
this.currentPage = 1;
this.sortedBy = selectedSort; this.sortedBy = selectedSort;
}, },
onIssuableListFilter(filters = []) { onIssuableListFilter(filters = []) {
......
...@@ -152,10 +152,7 @@ Object { ...@@ -152,10 +152,7 @@ Object {
"totalItems": 3, "totalItems": 3,
"urlParams": Object { "urlParams": Object {
"labels[]": undefined, "labels[]": undefined,
"page": 1,
"search": undefined, "search": undefined,
"sort": "created_desc",
"state": "opened",
}, },
"useKeysetPagination": false, "useKeysetPagination": false,
} }
......
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