Skip to content

Commit 557abb5

Browse files
authored
fix: Add button type attribute to pagination controls in RADFishTable (#696)
1 parent 18974cf commit 557abb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-radfish/table/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,15 @@ const RADFishTable = ({
187187
{paginationOptions && (
188188
<div className="radfish-pagination-controls">
189189
<Button
190+
type="button"
190191
onClick={() => handlePageChange(0)}
191192
disabled={pageIndex === 0}
192193
data-testid="first-page"
193194
>
194195
<Icon.FirstPage aria-label="Go to first page" />
195196
</Button>
196197
<Button
198+
type="button"
197199
onClick={() => handlePageChange(pageIndex - 1)}
198200
disabled={pageIndex === 0}
199201
data-testid="previous-page"
@@ -204,13 +206,15 @@ const RADFishTable = ({
204206
Page {pageIndex + 1} of {totalPages}
205207
</span>
206208
<Button
209+
type="button"
207210
onClick={() => handlePageChange(pageIndex + 1)}
208211
disabled={pageIndex >= totalPages - 1}
209212
data-testid="next-page"
210213
>
211214
<Icon.ArrowForward aria-label="Go to next page" />
212215
</Button>
213216
<Button
217+
type="button"
214218
onClick={() => handlePageChange(totalPages - 1)}
215219
disabled={pageIndex >= totalPages - 1}
216220
data-testid="last-page"

0 commit comments

Comments
 (0)