mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-06-28 13:10:03 +00:00
tweak pagination factory name
This commit is contained in:
@@ -75,11 +75,6 @@
|
||||
"react": "16.0.0",
|
||||
"react-dom": "16.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
},
|
||||
"jest": {
|
||||
"collectCoverageFrom": [
|
||||
"packages/**/*.js"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-editor",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.1-beta.3",
|
||||
"description": "it's the editor addon for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git"
|
||||
@@ -26,10 +27,16 @@
|
||||
"react"
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}],
|
||||
"license": "MIT"
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}
|
||||
],
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
|
||||
@@ -21,7 +21,7 @@ const columns = [{
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// ...
|
||||
const RemotePagination = ({ data, page, sizePerPage, onTableChange, totalSize }) => (
|
||||
<div>
|
||||
@@ -30,7 +30,7 @@ const RemotePagination = ({ data, page, sizePerPage, onTableChange, totalSize })
|
||||
keyField="id"
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
@@ -90,7 +90,7 @@ const Table = ({ data, page, sizePerPage, onTableChange, totalSize }) => (
|
||||
keyField="id"
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
noDataIndication={ () => <NoDataIndication /> }
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import overlayFactory from 'react-bootstrap-table2-overlay';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
@@ -22,7 +22,7 @@ const columns = [{
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import overlayFactory from 'react-bootstrap-table2-overlay';
|
||||
|
||||
// ...
|
||||
@@ -34,7 +34,7 @@ const RemotePagination = ({ loading, data, page, sizePerPage, onTableChange, tot
|
||||
keyField="id"
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
overlay={ overlayFactory({ spinner: true, background: 'rgba(192,192,192,0.3)' }) }
|
||||
/>
|
||||
@@ -99,7 +99,7 @@ const RemotePagination = ({ loading, data, page, sizePerPage, onTableChange, tot
|
||||
keyField="id"
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
overlay={ overlayFactory({ spinner: true, background: 'rgba(192,192,192,0.3)' }) }
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
|
||||
@@ -21,7 +21,7 @@ const columns = [{
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// ...
|
||||
|
||||
const options = {
|
||||
@@ -48,7 +48,7 @@ const options = {
|
||||
}] // A numeric array is also available. the purpose of above example is custom the text
|
||||
};
|
||||
|
||||
<BootstrapTable keyField='id' data={ products } columns={ columns } pagination={ paginator(options) } />
|
||||
<BootstrapTable keyField='id' data={ products } columns={ columns } pagination={ paginationFactory(options) } />
|
||||
`;
|
||||
const options = {
|
||||
paginationSize: 4,
|
||||
@@ -76,7 +76,7 @@ const options = {
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } pagination={ paginator(options) } />
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } pagination={ paginationFactory(options) } />
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
|
||||
@@ -21,7 +21,7 @@ const columns = [{
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// ...
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
@@ -34,12 +34,12 @@ const columns = [{
|
||||
text: 'Product Price'
|
||||
}];
|
||||
|
||||
<BootstrapTable keyField='id' data={ products } columns={ columns } pagination={ paginator() } />
|
||||
<BootstrapTable keyField='id' data={ products } columns={ columns } pagination={ paginationFactory() } />
|
||||
`;
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } pagination={ paginator() } />
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } pagination={ paginationFactory() } />
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
|
||||
@@ -22,7 +22,7 @@ const columns = [{
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// ...
|
||||
const columns = [{
|
||||
dataField: 'id',
|
||||
@@ -52,7 +52,7 @@ const options = {
|
||||
keyField="id"
|
||||
data={ products }
|
||||
columns={ columns }
|
||||
pagination={ paginator(options) }
|
||||
pagination={ paginationFactory(options) }
|
||||
/>
|
||||
`;
|
||||
|
||||
@@ -75,7 +75,7 @@ export default () => (
|
||||
keyField="id"
|
||||
data={ products }
|
||||
columns={ columns }
|
||||
pagination={ paginator(options) }
|
||||
pagination={ paginationFactory(options) }
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import filterFactory, { textFilter, Comparator } from 'react-bootstrap-table2-filter';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
@@ -25,7 +25,7 @@ const columns = [{
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import filterFactory, { textFilter, Comparator } from 'react-bootstrap-table2-filter';
|
||||
// ...
|
||||
|
||||
@@ -50,7 +50,7 @@ const RemoteAll = ({ data, page, sizePerPage, onTableChange, totalSize }) => (
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
filter={ filterFactory() }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
@@ -130,7 +130,7 @@ const RemoteAll = ({ data, page, sizePerPage, onTableChange, totalSize }) => (
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
filter={ filterFactory() }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
import Code from 'components/common/code-block';
|
||||
import { productsGenerator } from 'utils/common';
|
||||
|
||||
@@ -21,7 +21,7 @@ const columns = [{
|
||||
|
||||
const sourceCode = `\
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
import paginator from 'react-bootstrap-table2-paginator';
|
||||
import paginationFactory from 'react-bootstrap-table2-paginator';
|
||||
// ...
|
||||
const RemotePagination = ({ data, page, sizePerPage, onTableChange, totalSize }) => (
|
||||
<div>
|
||||
@@ -30,7 +30,7 @@ const RemotePagination = ({ data, page, sizePerPage, onTableChange, totalSize })
|
||||
keyField="id"
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
@@ -80,7 +80,7 @@ const RemotePagination = ({ data, page, sizePerPage, onTableChange, totalSize })
|
||||
keyField="id"
|
||||
data={ data }
|
||||
columns={ columns }
|
||||
pagination={ paginator({ page, sizePerPage, totalSize }) }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-example",
|
||||
"version": "0.0.1-beta.1",
|
||||
"version": "0.0.1-beta.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-filter",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.1-beta.3",
|
||||
"description": "it's a column filter addon for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"react",
|
||||
"bootstrap",
|
||||
@@ -23,10 +24,16 @@
|
||||
"react"
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}],
|
||||
"license": "MIT"
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}
|
||||
],
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-overlay",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.1-beta.3",
|
||||
"description": "it's a loading overlay addons for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"react",
|
||||
"bootstrap",
|
||||
@@ -23,13 +24,19 @@
|
||||
"react"
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}],
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"react-loading-overlay": "0.2.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,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
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "react-bootstrap-table2-paginator",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.1-beta.3",
|
||||
"description": "it's the pagination addon for react-bootstrap-table2",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"react",
|
||||
"bootstrap",
|
||||
@@ -23,10 +24,16 @@
|
||||
"react"
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}],
|
||||
"license": "MIT"
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}
|
||||
],
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "react-bootstrap-table-next",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.1-beta.3",
|
||||
"description": "Next generation of react-bootstrap-table",
|
||||
"main": "./lib/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/react-bootstrap-table/react-bootstrap-table2.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"react",
|
||||
"bootstrap",
|
||||
@@ -22,10 +23,20 @@
|
||||
"react"
|
||||
],
|
||||
"author": "AllenFang",
|
||||
"contributors": [{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}],
|
||||
"license": "MIT"
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Chun-MingChen",
|
||||
"email": "nick830314@gmail.com",
|
||||
"url": "https://github.com/Chun-MingChen"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"classnames": "2.2.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"classnames": "^2.2.5",
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user