Commit 5179afec authored by Justin Ho's avatar Justin Ho

Update urlParams on Jira issues list page

When already set to the default values, we don't need to
include params like page, sort, state in urlParams.

This prevents the URL to flash and update on load from
/-/integrations/jira/issues to
/-/integrations/jira/issues?page=1&sort=created_desc&state=opened

Changelog: changed
EE: true
parent 9931ea23
......@@ -74,10 +74,10 @@ export default {
urlParams() {
return {
'labels[]': this.filterParams.labels,
page: this.currentPage,
search: this.filterParams.search,
sort: this.sortedBy,
state: this.currentState,
...(this.currentPage === 1 ? {} : { page: this.currentPage }),
...(this.sortedBy === this.initialSortBy ? {} : { sort: this.sortedBy }),
...(this.currentState === this.initialState ? {} : { state: this.currentState }),
};
},
},
......
......@@ -152,10 +152,7 @@ Object {
"totalItems": 3,
"urlParams": Object {
"labels[]": undefined,
"page": 1,
"search": undefined,
"sort": "created_desc",
"state": "opened",
},
"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