@@ -15,6 +15,8 @@ const defaultComponentOptions = {
15
15
noRowsPerPage : false ,
16
16
selectAllRowsItem : false ,
17
17
selectAllRowsItemText : 'All' ,
18
+ firstPage : true ,
19
+ lastPage : true ,
18
20
} ;
19
21
20
22
const PaginationWrapper = styled . nav `
@@ -150,17 +152,19 @@ function Pagination({
150
152
) }
151
153
{ shouldShow && < Range > { range } </ Range > }
152
154
< PageList >
153
- < Button
154
- id = "pagination-first-page"
155
- type = "button"
156
- aria-label = "First Page"
157
- aria-disabled = { disabledLesser }
158
- onClick = { handleFirst }
159
- disabled = { disabledLesser }
160
- isRTL = { isRTL }
161
- >
162
- { paginationIconFirstPage }
163
- </ Button >
155
+ { options . firstPage && (
156
+ < Button
157
+ id = "pagination-first-page"
158
+ type = "button"
159
+ aria-label = "First Page"
160
+ aria-disabled = { disabledLesser }
161
+ onClick = { handleFirst }
162
+ disabled = { disabledLesser }
163
+ isRTL = { isRTL }
164
+ >
165
+ { paginationIconFirstPage }
166
+ </ Button >
167
+ ) }
164
168
165
169
< Button
166
170
id = "pagination-previous-page"
@@ -188,17 +192,19 @@ function Pagination({
188
192
{ paginationIconNext }
189
193
</ Button >
190
194
191
- < Button
192
- id = "pagination-last-page"
193
- type = "button"
194
- aria-label = "Last Page"
195
- aria-disabled = { disabledGreater }
196
- onClick = { handleLast }
197
- disabled = { disabledGreater }
198
- isRTL = { isRTL }
199
- >
200
- { paginationIconLastPage }
201
- </ Button >
195
+ { options . lastPage && (
196
+ < Button
197
+ id = "pagination-last-page"
198
+ type = "button"
199
+ aria-label = "Last Page"
200
+ aria-disabled = { disabledGreater }
201
+ onClick = { handleLast }
202
+ disabled = { disabledGreater }
203
+ isRTL = { isRTL }
204
+ >
205
+ { paginationIconLastPage }
206
+ </ Button >
207
+ ) }
202
208
</ PageList >
203
209
</ PaginationWrapper >
204
210
) ;
0 commit comments