File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 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);
7676| nextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
7777| jumpPrevIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
7878| jumpNextIcon | specifict the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
79-
79+ | hideBoundary | hide boundary jumper | Bool | false |
8080
8181## License
8282
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class Pagination extends React.Component {
5353 nextIcon : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . node ] ) ,
5454 jumpPrevIcon : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . node ] ) ,
5555 jumpNextIcon : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . node ] ) ,
56+ hideBoundary : PropTypes . bool ,
5657 } ;
5758
5859 static defaultProps = {
@@ -74,6 +75,7 @@ class Pagination extends React.Component {
7475 locale : LOCALE ,
7576 style : { } ,
7677 itemRender : defaultItemRender ,
78+ hideBoundary : false ,
7779 } ;
7880
7981 constructor ( props ) {
@@ -569,10 +571,10 @@ class Pagination extends React.Component {
569571 pagerList . push ( jumpNext ) ;
570572 }
571573
572- if ( left !== 1 ) {
574+ if ( left !== 1 && ! props . hideBoundary ) {
573575 pagerList . unshift ( firstPager ) ;
574576 }
575- if ( right !== allPages ) {
577+ if ( right !== allPages && ! props . hideBoundary ) {
576578 pagerList . push ( lastPager ) ;
577579 }
578580 }
You can’t perform that action at this time.
0 commit comments