diff --git a/src/react-next-paging.js b/src/react-next-paging.js index f02046b..007bcb0 100644 --- a/src/react-next-paging.js +++ b/src/react-next-paging.js @@ -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);