@@ -152,13 +152,13 @@ class Pagination extends React.Component {
152
152
153
153
getJumpPrevPage = ( ) => {
154
154
const { showLessItems } = this . props ;
155
- const hasPagerCount = this . hasPagerCount ( )
155
+ const hasPagerCount = this . hasPagerCount ( ) ;
156
156
return Math . max ( 1 , this . state . current - ( showLessItems && ! hasPagerCount ? 3 : 5 ) ) ;
157
157
}
158
158
159
159
getJumpNextPage = ( ) => {
160
160
const { showLessItems } = this . props ;
161
- const hasPagerCount = this . hasPagerCount ( )
161
+ const hasPagerCount = this . hasPagerCount ( ) ;
162
162
return Math . min (
163
163
calculatePage ( undefined , this . state , this . props ) ,
164
164
this . state . current + ( showLessItems && ! hasPagerCount ? 3 : 5 )
@@ -352,9 +352,11 @@ class Pagination extends React.Component {
352
352
// `pagerCount` priority is greater than `showLessItems`.
353
353
const hasPagerCount = this . hasPagerCount ( ) ;
354
354
const boundary = pagerCount === 0 ? 0 : 1 ;
355
- const boundaryRemainder = hasPagerCount ? ( pagerCount % 2 !== 0 ? 0 : boundary ) : 0 ;
355
+ const pagerCountBoundary = pagerCount % 2 !== 0 ? 0 : boundary ;
356
+ const boundaryRemainder = hasPagerCount ? pagerCountBoundary : 0 ;
356
357
const halfPagerCount = Math . max ( 0 , Math . floor ( ( pagerCount - 1 ) / 2 ) ) ;
357
- const pageBufferSize = hasPagerCount ? halfPagerCount : ( showLessItems ? 1 : halfPagerCount ) ;
358
+ const halfHasLessItemsCount = showLessItems ? 1 : halfPagerCount ;
359
+ const pageBufferSize = hasPagerCount ? halfPagerCount : halfHasLessItemsCount ;
358
360
359
361
const goButton = ( props . showQuickJumper && props . showQuickJumper . goButton ) ;
360
362
const { current, pageSize } = this . state ;
0 commit comments