From 27036e51f10402d947148608261120b58d0450b0 Mon Sep 17 00:00:00 2001 From: Rafael Mora Date: Sun, 3 Mar 2019 11:19:57 -0500 Subject: [PATCH] fix(initial values): initial values --- src/react-next-paging.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/react-next-paging.js b/src/react-next-paging.js index 2b75e90..e7c0874 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 !== prevProps.items || - this.props.itemsperpage !== prevProps.itemsperpage || - this.props.pagesspan !== prevProps.pagesspan + this.props.items.length != prevProps.items.length || + this.props.itemsperpage != prevProps.itemsperpage || + this.props.pagesspan != prevProps.pagesspan ) { const { currentpage } = prevState; const newState = this.generateStateFromProps(this.props, currentpage);