Skip to content

Commit

Permalink
fix KeyboardEvent type
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Sep 9, 2022
1 parent 70e06dc commit 428c6c4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { KeyboardEvent } from "react";
import { useEffect } from "react";

import { MainTable } from "@canonical/react-components";
Expand Down Expand Up @@ -73,7 +74,7 @@ const generateRows = (
],
"data-testid": "machine-select-row",
onClick: () => onRowClick(machine),
onKeyPress: (e: KeyboardEvent) => {
onKeyPress: (e: KeyboardEvent<HTMLTableRowElement>) => {
if (e.key === "Enter") {
e.preventDefault();
onRowClick(machine);
Expand Down

0 comments on commit 428c6c4

Please sign in to comment.