summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-06-08 03:09:37 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2017-06-08 03:09:37 -0500
commitceedefec54b7f7a50308b07a2697a81ef1752fc8 (patch)
treef88f08ff25e6bdda3fb4f862bf81e4baf842e20a
parent2a33752cb4b3a19cf51cd3a97feec892f750ba6f (diff)
downloadgitlab-ce-ceedefec54b7f7a50308b07a2697a81ef1752fc8.tar.gz
Update URL when paginating groups
-rw-r--r--app/assets/javascripts/groups/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/groups/index.js b/app/assets/javascripts/groups/index.js
index 508590f8676..5b7018153bf 100644
--- a/app/assets/javascripts/groups/index.js
+++ b/app/assets/javascripts/groups/index.js
@@ -94,7 +94,12 @@ document.addEventListener('DOMContentLoaded', () => {
this.isLoading = false;
$.scrollTo(0);
- this.updateGroups(response.json());
+ const currentPath = gl.utils.mergeUrlParams({ page: page }, window.location.href);
+ window.history.replaceState({
+ page: currentPath,
+ }, document.title, currentPath);
+
+ this.updateGroups(response.json());
this.updatePagination(response.headers);
})
.catch(this.handleErrorResponse);