blob: 3693b527d24f7c6965534ff787b34be7b3ec1dce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
export const PAGE_LIMIT = 10;
export class PageInfo {
// Total number of rows in a table
count: number;
// Current page (current row = offset x limit or pageSize)
offset = 0;
// Max. number of rows fetched from the server
limit: number = PAGE_LIMIT;
/*
pageSize and limit can be decoupled if hybrid server-side and client-side
are used. A use-case would be to reduce the amount of queries: that is,
the pageSize (client-side paging) might be 10, but the back-end queries
could have a limit of 100. That would avoid triggering requests
*/
pageSize: number = PAGE_LIMIT;
}
|