mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 13:08:13 +08:00
Allow adding page
parameters to PaginatedListState, like limit
. (#2935)
This commit is contained in:
parent
75739de071
commit
2d451ece09
@ -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(',');
|
||||
|
Loading…
x
Reference in New Issue
Block a user