From 9897825aba06aec69da0bcdba99ced1f94813d4b Mon Sep 17 00:00:00 2001 From: Peter Makowski Date: Fri, 9 Sep 2022 15:07:21 +0200 Subject: [PATCH] fix KeyboardEvent type --- .../base/components/MachineSelectTable/MachineSelectTable.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/base/components/MachineSelectTable/MachineSelectTable.tsx b/src/app/base/components/MachineSelectTable/MachineSelectTable.tsx index 0f6969ce91..8fbd61e74e 100644 --- a/src/app/base/components/MachineSelectTable/MachineSelectTable.tsx +++ b/src/app/base/components/MachineSelectTable/MachineSelectTable.tsx @@ -1,3 +1,4 @@ +import type { KeyboardEvent } from "react"; import { useEffect } from "react"; import { MainTable } from "@canonical/react-components"; @@ -73,7 +74,7 @@ const generateRows = ( ], "data-testid": "machine-select-row", onClick: () => onRowClick(machine), - onKeyPress: (e: KeyboardEvent) => { + onKeyPress: (e: KeyboardEvent) => { if (e.key === "Enter") { e.preventDefault(); onRowClick(machine);