diff --git a/src/Pagination.jsx b/src/Pagination.jsx index 4fbd6025..b0bce02e 100644 --- a/src/Pagination.jsx +++ b/src/Pagination.jsx @@ -129,11 +129,11 @@ export default class Pagination extends React.Component { } } - getJumpPrevPage() { + getJumpPrevPage = () => { return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : 5)); } - getJumpNextPage() { + getJumpNextPage = () => { return Math.min(this.calculatePage(), this.state.current + (this.props.showLessItems ? 3 : 5)); } @@ -263,14 +263,6 @@ export default class Pagination extends React.Component { } } - getJumpPrevPage() { - return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : 5)); - } - - getJumpNextPage() { - return Math.min(this.calculatePage(), this.state.current + (this.props.showLessItems ? 3 : 5)); - } - jumpPrev = () => { this.handleChange(this.getJumpPrevPage()); }