https://github.com/writetome51/pagination-page-info
Intended to help a separate Paginator class paginate data. Specifically, this class contains the properties `itemsPerPage` and `totalPages`, which will be used by other classes
https://github.com/writetome51/pagination-page-info
batch data javascript paginate pagination typescript
Last synced: 8 months ago
JSON representation
Intended to help a separate Paginator class paginate data. Specifically, this class contains the properties `itemsPerPage` and `totalPages`, which will be used by other classes
- Host: GitHub
- URL: https://github.com/writetome51/pagination-page-info
- Owner: writetome51
- License: mit
- Created: 2019-05-07T20:14:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T19:58:45.000Z (over 5 years ago)
- Last Synced: 2025-02-04T02:13:53.847Z (8 months ago)
- Topics: batch, data, javascript, paginate, pagination, typescript
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PaginationPageInfo
## Constructor
```ts
constructor(private __dataSource: {
// dataTotal: number of items in entire dataset.
// This must stay accurate after any actions that change the total,
// such as searches.
dataTotal: number;
}
)
```## Methods
view methods
```
setItemsPerPage(value: number): voidgetItemsPerPage(): number
getTotalPages(): number
```## Installation
`npm i @writetome51/pagination-page-info`
## Loading
```ts
// if using TypeScript:
import { PaginationPageInfo } from '@writetome51/pagination-page-info';
// if using ES5 JavaScript:
var PaginationPageInfo =
require('@writetome51/pagination-page-info').PaginationPageInfo;
```## License
[MIT](https://choosealicense.com/licenses/mit/)