diff options
author | Denys Mishunov <dmishunov@gitlab.com> | 2019-07-05 01:30:34 +0300 |
---|---|---|
committer | Denys Mishunov <dmishunov@gitlab.com> | 2019-07-05 13:50:50 +0300 |
commit | 352d535849e31e7defd0ce0e70fe3543f7282a17 (patch) | |
tree | 27c755dbc70c4bb5c591f3ca27191d10efcd0777 /app/assets/javascripts/filterable_list.js | |
parent | f845a081e336621e991587f88ee7d8ce6d012e21 (diff) |
Fixed back navigation for projects filter
Filterable list now sends request to filter the projects list
explicitly with `json` extension to avoid breakage when navigating back
from a project to the filtered project's list.
Diffstat (limited to 'app/assets/javascripts/filterable_list.js')
-rw-r--r-- | app/assets/javascripts/filterable_list.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/filterable_list.js b/app/assets/javascripts/filterable_list.js index 64b09c8b62c..77080691dcb 100644 --- a/app/assets/javascripts/filterable_list.js +++ b/app/assets/javascripts/filterable_list.js @@ -17,11 +17,13 @@ export default class FilterableList { } getFilterEndpoint() { - return `${this.filterForm.getAttribute('action')}?${$(this.filterForm).serialize()}`; + return this.getPagePath(); } getPagePath() { - return this.getFilterEndpoint(); + const action = this.filterForm.getAttribute('action'); + const params = $(this.filterForm).serialize(); + return `${action}${action.indexOf('?') > 0 ? '&' : '?'}${params}`; } initSearch() { |