File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ export class Pagination extends React.Component<IPaginationProps, IPaginationSta
60
60
paginationElements = this . preparePaginationElements ( this . props . totalPages ) ;
61
61
currentPage = this . state . currentPage > this . props . totalPages ? this . props . totalPages : this . state . currentPage ;
62
62
}
63
- if ( prevProps . totalPages !== this . props . totalPages && this . props . currentPage !== prevProps . currentPage ) {
64
- currentPage = this . props . currentPage ;
63
+ if ( this . props . currentPage !== prevProps . currentPage ) {
64
+ currentPage = this . props . currentPage > this . props . totalPages ? this . props . totalPages : this . props . currentPage ;
65
65
}
66
66
67
67
if ( ! isEqual ( this . state . currentPage , currentPage ) || ! isEqual ( this . state . paginationElements , paginationElements ) ) {
@@ -148,4 +148,4 @@ export class Pagination extends React.Component<IPaginationProps, IPaginationSta
148
148
}
149
149
}
150
150
}
151
- }
151
+ }
You can’t perform that action at this time.
0 commit comments