mirror of
https://github.com/flarum/framework.git
synced 2025-01-28 03:35:49 +08:00
Use calculated offset when loading page in PaginatedListState (#3159)
This commit is contained in:
parent
46def26c9f
commit
ec97c45d96
|
@ -93,8 +93,8 @@ export default abstract class PaginatedListState<T extends Model> {
|
||||||
protected loadPage(page = 1): Promise<T[]> {
|
protected loadPage(page = 1): Promise<T[]> {
|
||||||
const params = this.requestParams();
|
const params = this.requestParams();
|
||||||
params.page = {
|
params.page = {
|
||||||
offset: this.pageSize * (page - 1),
|
|
||||||
...params.page,
|
...params.page,
|
||||||
|
offset: this.pageSize * (page - 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Array.isArray(params.include)) {
|
if (Array.isArray(params.include)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user