lib/pagination
Api Code Documentation / Exports / lib/pagination
Table of contents
Interfaces
Functions
Functions
makePagination
▸ makePagination<T
>(route
, records
, currentChunk
, limit
, optionalParams
): Pagination
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
route | string |
records | T [] |
currentChunk | number |
limit | number |
optionalParams | Record <string , any > |
Returns
Defined in
paginate
▸ paginate<T
>(route
, records
, query
): [T
[], Pagination
]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
route | string |
records | T [] |
query | Object |
query.limit | string | number |
query.order? | string |
query.page | string | number |
query.search? | string |
query.sort? | string |
Returns
[T
[], Pagination
]