@@ -10,14 +10,18 @@ class PaginationList extends Component {
1010 constructor ( props ) {
1111 super ( props ) ;
1212 this . state = {
13- open : this . props . open
13+ open : this . props . open ,
14+ show : this . props . show
1415 } ;
1516 }
1617
1718 componentWillReceiveProps ( ) {
1819 const { keepSizePerPageState } = this . props ;
1920 if ( ! keepSizePerPageState ) {
20- this . setState ( { open : false } ) ;
21+ this . setState ( {
22+ open : false ,
23+ show : false
24+ } ) ;
2125 }
2226 }
2327
@@ -45,7 +49,12 @@ class PaginationList extends Component {
4549 page = parseInt ( page , 10 ) ;
4650 }
4751
48- if ( keepSizePerPageState ) { this . setState ( { open : false } ) ; }
52+ if ( keepSizePerPageState ) {
53+ this . setState ( {
54+ open : false ,
55+ show : false
56+ } ) ;
57+ }
4958
5059 if ( page !== currPage ) {
5160 this . props . changePage ( page , sizePerPage ) ;
@@ -64,12 +73,16 @@ class PaginationList extends Component {
6473 this . props . onSizePerPageList ( selectSize ) ;
6574 }
6675 }
67- this . setState ( { open : false } ) ;
76+ this . setState ( {
77+ open : false ,
78+ show : false
79+ } ) ;
6880 }
6981
7082 toggleDropDown = ( ) => {
7183 this . setState ( {
72- open : ! this . state . open
84+ open : ! this . state . open ,
85+ show : ! this . state . show
7386 } ) ;
7487 }
7588
@@ -149,6 +162,7 @@ class PaginationList extends Component {
149162 if ( sizePerPageDropDown ) {
150163 dropdown = sizePerPageDropDown ( {
151164 open : this . state . open ,
165+ show : this . state . show ,
152166 hideSizePerPage,
153167 currSizePerPage : String ( sizePerPage ) ,
154168 sizePerPageList,
@@ -182,6 +196,7 @@ class PaginationList extends Component {
182196 dropdown = (
183197 < SizePerPageDropDown
184198 open = { this . state . open }
199+ show = { this . state . show }
185200 hidden = { hideSizePerPage }
186201 currSizePerPage = { String ( sizePerPageText ) }
187202 options = { sizePerPageOptions }
0 commit comments