File tree 1 file changed +1
-11
lines changed
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -156,22 +156,19 @@ class PaginationList extends Component {
156
156
}
157
157
158
158
getPages ( ) {
159
- console . log ( 'start with totalPages ' + this . totalPages ) ;
160
- console . log ( 'last page should be ' + this . lastPage ) ;
161
159
let pages ;
162
160
let endPage = this . totalPages ;
163
161
let startPage = Math . max (
164
162
this . props . currPage - Math . floor ( this . props . paginationSize / 2 ) ,
165
163
this . props . pageStartIndex
166
164
) ;
167
165
endPage = startPage + this . props . paginationSize - 1 ;
168
- console . log ( 'end ' + endPage ) ;
166
+
169
167
if ( endPage > this . lastPage ) {
170
168
endPage = this . lastPage ;
171
169
startPage = endPage - this . props . paginationSize + 1 ;
172
170
}
173
171
174
- console . log ( 'end ' + endPage ) ;
175
172
if ( startPage !== this . props . pageStartIndex && this . totalPages > this . props . paginationSize ) {
176
173
pages = [ this . props . firstPage , this . props . prePage ] ;
177
174
} else if ( this . totalPages > 1 ) {
@@ -191,13 +188,6 @@ class PaginationList extends Component {
191
188
pages . push ( this . props . nextPage ) ;
192
189
}
193
190
194
- // if (endPage !== lastPage) {
195
- // pages.push(this.props.nextPage);
196
- // pages.push(this.props.lastPage);
197
- // } else if (this.totalPages > 1) {
198
- // pages.push(this.props.nextPage);
199
- // }
200
- console . log ( pages ) ;
201
191
return pages ;
202
192
}
203
193
}
You can’t perform that action at this time.
0 commit comments