Commit c228ff0b authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix pagination when sorting by option

parent c3f5e60e
...@@ -33,9 +33,17 @@ export default class GroupFilterableList extends FilterableList { ...@@ -33,9 +33,17 @@ export default class GroupFilterableList extends FilterableList {
this.filterResults(this.filterUrl); this.filterResults(this.filterUrl);
} }
onFilterSuccess(data) { onFilterSuccess(data, textStatus, xhr) {
super.onFilterSuccess(data); super.onFilterSuccess(data);
this.store.setGroups(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'),
});
} }
} }
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