@@ -10,14 +10,18 @@ class PaginationList extends Component {
10
10
constructor ( props ) {
11
11
super ( props ) ;
12
12
this . state = {
13
- open : this . props . open
13
+ open : this . props . open ,
14
+ show : this . props . show
14
15
} ;
15
16
}
16
17
17
18
componentWillReceiveProps ( ) {
18
19
const { keepSizePerPageState } = this . props ;
19
20
if ( ! keepSizePerPageState ) {
20
- this . setState ( { open : false } ) ;
21
+ this . setState ( {
22
+ open : false ,
23
+ show : false
24
+ } ) ;
21
25
}
22
26
}
23
27
@@ -45,7 +49,12 @@ class PaginationList extends Component {
45
49
page = parseInt ( page , 10 ) ;
46
50
}
47
51
48
- if ( keepSizePerPageState ) { this . setState ( { open : false } ) ; }
52
+ if ( keepSizePerPageState ) {
53
+ this . setState ( {
54
+ open : false ,
55
+ show : false
56
+ } ) ;
57
+ }
49
58
50
59
if ( page !== currPage ) {
51
60
this . props . changePage ( page , sizePerPage ) ;
@@ -64,12 +73,16 @@ class PaginationList extends Component {
64
73
this . props . onSizePerPageList ( selectSize ) ;
65
74
}
66
75
}
67
- this . setState ( { open : false } ) ;
76
+ this . setState ( {
77
+ open : false ,
78
+ show : false
79
+ } ) ;
68
80
}
69
81
70
82
toggleDropDown = ( ) => {
71
83
this . setState ( {
72
- open : ! this . state . open
84
+ open : ! this . state . open ,
85
+ show : ! this . state . show
73
86
} ) ;
74
87
}
75
88
@@ -149,6 +162,7 @@ class PaginationList extends Component {
149
162
if ( sizePerPageDropDown ) {
150
163
dropdown = sizePerPageDropDown ( {
151
164
open : this . state . open ,
165
+ show : this . state . show ,
152
166
hideSizePerPage,
153
167
currSizePerPage : String ( sizePerPage ) ,
154
168
sizePerPageList,
@@ -182,6 +196,7 @@ class PaginationList extends Component {
182
196
dropdown = (
183
197
< SizePerPageDropDown
184
198
open = { this . state . open }
199
+ show = { this . state . show }
185
200
hidden = { hideSizePerPage }
186
201
currSizePerPage = { String ( sizePerPageText ) }
187
202
options = { sizePerPageOptions }
0 commit comments