Skip to content

Commit 87ff9b0

Browse files
committed
Fix
1 parent bc83767 commit 87ff9b0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

examples/pagerCount.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ const total = 500;
77

88
const itemRender = (current, type, element) => {
99
const hideItems = ['jump-last', 'jump-first'];
10-
10+
1111
if (hideItems.includes(type)) {
1212
return null;
1313
}
14-
14+
1515
return element;
1616
};
1717

src/Pager.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const Pager = (props) => {
2525
props.onKeyPress(e, props.onClick, props.page);
2626
};
2727

28-
const itemRender = props.itemRender(props.page, 'page', <a>{props.page}</a>)
28+
const itemRender = props.itemRender(props.page, 'page', <a>{props.page}</a>);
2929

3030
return (
3131
itemRender === null ? null :

src/Pagination.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ class Pagination extends React.Component {
145145
}
146146

147147
getJumpPrevPage = () => {
148-
return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : this.props.pagerCount));
148+
return Math.max(1, this.state.current - (this.props.showLessItems ? 3 : 5));
149149
}
150150

151151
getJumpNextPage = () => {
152152
return Math.min(
153153
calculatePage(undefined, this.state, this.props),
154-
this.state.current + (this.props.showLessItems ? 3 : this.props.pagerCount)
154+
this.state.current + (this.props.showLessItems ? 3 : 5)
155155
);
156156
}
157157

@@ -509,12 +509,12 @@ class Pagination extends React.Component {
509509
1,
510510
'jump-first',
511511
this.getItemIcon(props.jumpNextIcon)
512-
)
512+
);
513513
const lastPagerRender = props.itemRender(
514514
allPages,
515515
'jump-last',
516516
this.getItemIcon(props.jumpNextIcon)
517-
)
517+
);
518518

519519
lastPager = (
520520
firstPagerRender === null ? null :

0 commit comments

Comments
 (0)