Skip to content

Commit 4c6f3f9

Browse files
committed
example for #462
1 parent 07b3e7a commit 4c6f3f9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

examples/js/pagination/custom-pagination-table.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ function addProducts(quantity) {
2020
addProducts(100);
2121

2222
export default class CustomPaginationTable extends React.Component {
23+
24+
renderShowsTotal(start, to, total) {
25+
return (
26+
<p style={ { color: 'blue' } }>
27+
From { start } to { to }, totals is { total }&nbsp;&nbsp;(its a customize text)
28+
</p>
29+
);
30+
}
31+
2332
render() {
2433
const options = {
2534
page: 2, // which page you want to show as default
@@ -31,7 +40,7 @@ export default class CustomPaginationTable extends React.Component {
3140
nextPage: 'Next', // Next page button text
3241
firstPage: 'First', // First page button text
3342
lastPage: 'Last', // Last page button text
34-
paginationShowsTotal: true
43+
paginationShowsTotal: this.renderShowsTotal // Accept bool or function
3544
};
3645

3746
return (

0 commit comments

Comments
 (0)