pagination parse
This commit is contained in:
parent
266645d08f
commit
13eefb166a
@ -8,8 +8,8 @@ import {
|
|||||||
export class PaginationService {
|
export class PaginationService {
|
||||||
public paginate(options: PageOptions, rowCount: number): PaginationOptions {
|
public paginate(options: PageOptions, rowCount: number): PaginationOptions {
|
||||||
const paginationOptions: PaginationOptions = {
|
const paginationOptions: PaginationOptions = {
|
||||||
page: options.page || 1,
|
page: parseInt(options.page?.toString(), 10) || 1,
|
||||||
pageSize: options.pageSize || 50,
|
pageSize: parseInt(options.pageSize?.toString(), 10) || 50,
|
||||||
rowCount,
|
rowCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user