Skip to content

Commit e409e1f

Browse files
authored
Merge pull request #1160 from Arnei/nested-button-indropdown
Fix nested buttons in dropdown warning
2 parents f66f82c + ad1865f commit e409e1f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/components/shared/Table.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import ButtonLikeAnchor from "./ButtonLikeAnchor";
4040
import { ModalHandle } from "./modals/Modal";
4141
import { ParseKeys } from "i18next";
4242

43-
const containerPageSize = React.createRef<HTMLButtonElement>();
43+
const containerPageSize = React.createRef<HTMLDivElement>();
4444

4545
type TemplateMap = {
4646
[key: string]: ({ row }: { row: any }) => JSX.Element | JSX.Element[]
@@ -292,10 +292,12 @@ const Table = ({
292292

293293
{/* Selection of page size */}
294294
<div id="tbl-view-controls-container">
295-
<button
295+
<div
296296
className="drop-down-container small flipped"
297297
onClick={() => setShowPageSizes(!showPageSizes)}
298298
ref={containerPageSize}
299+
role="button"
300+
tabIndex={0}
299301
>
300302
<span>{pagination.limit}</span>
301303
{/* Drop down menu for selection of page size */}
@@ -312,7 +314,7 @@ const Table = ({
312314
))}
313315
</ul>
314316
)}
315-
</button>
317+
</div>
316318

317319
{/* Pagination and navigation trough pages */}
318320
<div className="pagination">

0 commit comments

Comments
 (0)