File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ const total = 500;
77
88const 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
Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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 :
You can’t perform that action at this time.
0 commit comments