Skip to content

Commit 19be67c

Browse files
committed
fix #599
1 parent ae4d38c commit 19be67c

File tree

1 file changed

+10
-0
lines changed
  • packages/react-bootstrap-table2/src/contexts

1 file changed

+10
-0
lines changed

packages/react-bootstrap-table2/src/contexts/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ const withContext = Base =>
5454
}
5555
}
5656

57+
componentWillReceiveProps(nextProps) {
58+
if (!nextProps.pagination && this.props.pagination) {
59+
this.PaginationContext = null;
60+
}
61+
if (nextProps.pagination && !this.props.pagination) {
62+
this.PaginationContext = nextProps.pagination.createContext(
63+
this.isRemotePagination, this.handleRemotePageChange);
64+
}
65+
}
66+
5767
renderBase() {
5868
return (
5969
rootProps,

0 commit comments

Comments
 (0)