mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-07-01 14:40:02 +00:00
paginationFactory renming
This commit is contained in:
@@ -30,10 +30,10 @@ import 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.m
|
||||
Let's enable a pagination on your table:
|
||||
|
||||
```js
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// omit...
|
||||
|
||||
<BootstrapTable keyField='id' data={ products } columns={ columns } pagination={ paginator() } />
|
||||
<BootstrapTable keyField='id' data={ products } columns={ columns } pagination={ paginationFactory() } />
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
@@ -179,17 +179,17 @@ $ npm install react-bootstrap-table2-paginator --save
|
||||
After installation of `react-bootstrap-table2-paginator`, you can enable pagination on `react-bootstrap-table2` easily:
|
||||
|
||||
```js
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
|
||||
// omit...
|
||||
|
||||
<BootstrapTable data={ data } columns={ columns } pagination={ paginator() } />
|
||||
<BootstrapTable data={ data } columns={ columns } pagination={ paginationFactory() } />
|
||||
```
|
||||
|
||||
`paginator` is a function actually and allow to pass some pagination options, following we list all the available options:
|
||||
`paginationFactory` is a function actually and allow to pass some pagination options, following we list all the available options:
|
||||
|
||||
```js
|
||||
paginator({
|
||||
paginationFactory({
|
||||
page, // Specify the current page. It's necessary when remote is enabled
|
||||
sizePerPage, // Specify the size per page. It's necessary when remote is enabled
|
||||
totalSize, // Total data size. It's necessary when remote is enabled
|
||||
|
||||
Reference in New Issue
Block a user