Skip to content

Commit 7fbd868

Browse files
committed
fix #176
1 parent d4b3f87 commit 7fbd868

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/BootstrapTable.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ class BootstrapTable extends React.Component {
476476
paginationSize={this.props.options.paginationSize || Const.PAGINATION_SIZE}
477477
remote={this.isRemoteDataSource()}
478478
dataSize={dataSize}
479+
onSizePerPageList={this.props.options.onSizePerPageList}
479480
/>
480481
</div>
481482
);
@@ -602,6 +603,7 @@ BootstrapTable.propTypes = {
602603
paginationSize: React.PropTypes.number,
603604
onSortChange: React.PropTypes.func,
604605
onPageChange: React.PropTypes.func,
606+
onSizePerPageList: React.PropTypes.func
605607
}),
606608
fetchInfo: React.PropTypes.shape({
607609
dataTotalSize: React.PropTypes.number,
@@ -650,7 +652,8 @@ BootstrapTable.defaultProps = {
650652
page: 1,
651653
sizePerPageList: Const.SIZE_PER_PAGE_LIST,
652654
sizePerPage: Const.SIZE_PER_PAGE_LIST[0],
653-
paginationSize: Const.PAGINATION_SIZE
655+
paginationSize: Const.PAGINATION_SIZE,
656+
onSizePerPageList: undefined
654657
},
655658
fetchInfo: {
656659
dataTotalSize: 0,

src/pagination/PaginationList.js

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class PaginationList extends React.Component {
5757
currentPage: this.state.currentPage
5858
});
5959
this.props.changePage(this.state.currentPage, selectSize);
60+
if(this.props.onSizePerPageList){
61+
this.props.onSizePerPageList(selectSize);
62+
}
6063
}
6164
}
6265

@@ -147,6 +150,7 @@ PaginationList.propTypes = {
147150
sizePerPageList: React.PropTypes.array,
148151
paginationSize: React.PropTypes.number,
149152
remote: React.PropTypes.bool,
153+
onSizePerPageList: React.PropTypes.func
150154
};
151155

152156
PaginationList.defaultProps = {

0 commit comments

Comments
 (0)