File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ const Pagination = React.createClass({
51
51
if ( ! hasHiddenPagesAfter ) {
52
52
endPage = items ;
53
53
startPage = items - maxButtons + 1 ;
54
+ if ( startPage < 1 ) {
55
+ startPage = 1 ;
56
+ }
54
57
} else {
55
58
endPage = startPage + maxButtons - 1 ;
56
59
}
@@ -109,7 +112,7 @@ const Pagination = React.createClass({
109
112
< PaginationButton
110
113
key = 'next'
111
114
eventKey = { this . props . activePage + 1 }
112
- disabled = { this . props . activePage == = this . props . items }
115
+ disabled = { this . props . activePage > = this . props . items }
113
116
onSelect = { this . props . onSelect } >
114
117
< span aria-label = 'Next' > ›</ span >
115
118
</ PaginationButton >
@@ -141,7 +144,7 @@ const Pagination = React.createClass({
141
144
< PaginationButton
142
145
key = 'last'
143
146
eventKey = { this . props . items }
144
- disabled = { this . props . activePage == = this . props . items }
147
+ disabled = { this . props . activePage > = this . props . items }
145
148
onSelect = { this . props . onSelect } >
146
149
< span aria-label = 'Last' > »</ span >
147
150
</ PaginationButton >
You can’t perform that action at this time.
0 commit comments