Skip to content

Commit a3d5b5a

Browse files
committed
Fix nested buttons in dropdown warning
Fixes a console warning for the table size dropdown and the bottom right of most pages. Also slightly fixes the CSS to avoid overlapping of elements
1 parent 57e21b1 commit a3d5b5a

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
@@ -37,7 +37,7 @@ import { useAppDispatch, useAppSelector } from "../../store";
3737
import { TableColumn } from "../../configs/tableConfigs/aclsTableConfig";
3838
import { ModalHandle } from "./modals/Modal";
3939

40-
const containerPageSize = React.createRef<HTMLButtonElement>();
40+
const containerPageSize = React.createRef<HTMLDivElement>();
4141

4242
type TemplateMap = {
4343
[key: string]: ({ row }: { row: any }) => JSX.Element | JSX.Element[]
@@ -289,10 +289,12 @@ const Table = ({
289289

290290
{/* Selection of page size */}
291291
<div id="tbl-view-controls-container">
292-
<button
292+
<div
293293
className="drop-down-container small flipped"
294294
onClick={() => setShowPageSizes(!showPageSizes)}
295295
ref={containerPageSize}
296+
role="button"
297+
tabIndex={0}
296298
>
297299
<span>{pagination.limit}</span>
298300
{/* Drop down menu for selection of page size */}
@@ -310,7 +312,7 @@ const Table = ({
310312
))}
311313
</ul>
312314
)}
313-
</button>
315+
</div>
314316

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

0 commit comments

Comments
 (0)