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 27036e5 commit cce36fb
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/react-next-paging.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,6 @@ class ReactNextPaging extends React.Component {
}
}

// componentDidUpdate(prevProps, prevState, snapshot) {
// const { items } = this.props;
// if (items.length != prevProps.items.length) {
// const { itemsperpage } = this.props;
// const { pagesspan } = this.state;
// let newnopages = getNoPages(items, itemsperpage);
// let pagesforarray = isNoPagesLargerPagesSpan(newnopages, pagesspan)
// ? pagesspan
// : newnopages;
// this.setState({
// nopages: newnopages,
// noitems: items.length,
// pagesforarray: pagesforarray
// });
// }
// }

generateStateFromProps = (props, currentpage = 1) => {
const { items, itemsperpage, pagesspan } = props;
let newnopages = getNoPages(items, itemsperpage);
Expand Down

0 comments on commit cce36fb

Please sign in to comment.