diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-30 19:16:49 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-30 19:16:49 -0500 |
commit | c228ff0be4f5fdae9b03859707af51a06bd6006d (patch) | |
tree | 8b2296a39169a467c00487523c52ddffc23b10b9 /app | |
parent | c3f5e60e635ecfaca763a354303613ab9c2092f4 (diff) | |
download | gitlab-ce-c228ff0be4f5fdae9b03859707af51a06bd6006d.tar.gz |
Fix pagination when sorting by option
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/groups/groups_filterable_list.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/groups/groups_filterable_list.js b/app/assets/javascripts/groups/groups_filterable_list.js index be89955c101..ab674dd4f5b 100644 --- a/app/assets/javascripts/groups/groups_filterable_list.js +++ b/app/assets/javascripts/groups/groups_filterable_list.js @@ -33,9 +33,17 @@ export default class GroupFilterableList extends FilterableList { this.filterResults(this.filterUrl); } - onFilterSuccess(data) { + onFilterSuccess(data, textStatus, xhr) { super.onFilterSuccess(data); this.store.setGroups(data); + this.store.storePagination({ + 'X-Per-Page': xhr.getResponseHeader('X-Per-Page'), + 'X-Page': xhr.getResponseHeader('X-Page'), + 'X-Total': xhr.getResponseHeader('X-Total'), + 'X-Total-Pages': xhr.getResponseHeader('X-Total-Pages'), + 'X-Next-Page': xhr.getResponseHeader('X-Next-Page'), + 'X-Prev-Page': xhr.getResponseHeader('X-Prev-Page'), + }); } } |