File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ React.render(<Pagination />, container);
76
76
| nextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
77
77
| jumpPrevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
78
78
| jumpNextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
79
-
79
+ | hideBoundary | hide boundary jumper | Bool | false |
80
80
81
81
## License
82
82
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class Pagination extends React.Component {
53
53
nextIcon : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . node ] ) ,
54
54
jumpPrevIcon : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . node ] ) ,
55
55
jumpNextIcon : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . node ] ) ,
56
+ hideBoundary : PropTypes . bool ,
56
57
} ;
57
58
58
59
static defaultProps = {
@@ -74,6 +75,7 @@ class Pagination extends React.Component {
74
75
locale : LOCALE ,
75
76
style : { } ,
76
77
itemRender : defaultItemRender ,
78
+ hideBoundary : false ,
77
79
} ;
78
80
79
81
constructor ( props ) {
@@ -569,10 +571,10 @@ class Pagination extends React.Component {
569
571
pagerList . push ( jumpNext ) ;
570
572
}
571
573
572
- if ( left !== 1 ) {
574
+ if ( left !== 1 && ! props . hideBoundary ) {
573
575
pagerList . unshift ( firstPager ) ;
574
576
}
575
- if ( right !== allPages ) {
577
+ if ( right !== allPages && ! props . hideBoundary ) {
576
578
pagerList . push ( lastPager ) ;
577
579
}
578
580
}
You can’t perform that action at this time.
0 commit comments