paginationFactory renming

This commit is contained in:
AllenFang
2018-01-20 17:50:21 +08:00
parent 3e93fa71a1
commit 234a446a4f
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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