Skip to content

Commit

Permalink
Allow adding page parameters to PaginatedListState, like limit. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
iPurpl3x committed Aug 26, 2021
1 parent d82c093 commit 71073b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/src/common/states/PaginatedListState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ export default abstract class PaginatedListState<T extends Model> {
*/
protected loadPage(page = 1): Promise<T[]> {
const params = this.requestParams();
params.page = { offset: this.pageSize * (page - 1) };
params.page = {
offset: this.pageSize * (page - 1),
...params.page,
};

if (Array.isArray(params.include)) {
params.include = params.include.join(',');
Expand Down

0 comments on commit 71073b0

Please sign in to comment.