Skip to content

Commit

Permalink
fix(initial values): initial values
Browse files Browse the repository at this point in the history
  • Loading branch information
titanve committed Mar 3, 2019
1 parent cce36fb commit cf3f784
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/react-next-paging.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ class ReactNextPaging extends React.Component {

componentDidUpdate(prevProps, prevState, snapshot) {
if (
this.props.items.length != prevProps.items.length ||
this.props.itemsperpage != prevProps.itemsperpage ||
this.props.pagesspan != prevProps.pagesspan
this.props.items !== prevProps.items ||
this.props.itemsperpage !== prevProps.itemsperpage ||
this.props.pagesspan !== prevProps.pagesspan
) {
const { currentpage } = prevState;
const newState = this.generateStateFromProps(this.props, currentpage);
Expand Down

0 comments on commit cf3f784

Please sign in to comment.