From d65b947c84c44fd424e312bc93bafbe9503b9502 Mon Sep 17 00:00:00 2001 From: Derek Hassan Date: Thu, 9 Feb 2023 09:20:29 -0500 Subject: [PATCH] refactor: change all onKeyPress uses to use onKeyDown instead (#927) --- packages/card/components/ButtonCard.tsx | 14 +++++++------- packages/clickable/README.md | 2 +- packages/clickable/components/clickable.tsx | 6 +++--- packages/clickable/tests/clickable.test.tsx | 14 +++++++------- .../textInput/components/TextInputWithBadges.tsx | 8 -------- 5 files changed, 18 insertions(+), 26 deletions(-) diff --git a/packages/card/components/ButtonCard.tsx b/packages/card/components/ButtonCard.tsx index ca0206a26..8a0b63a76 100644 --- a/packages/card/components/ButtonCard.tsx +++ b/packages/card/components/ButtonCard.tsx @@ -40,27 +40,27 @@ const ButtonCard = ({ hasFocus, onClick, className, - onKeyPress, + onKeyDown, "data-cy": dataCy = "buttonCard", ...other }: ButtonCardProps) => { const tabIndex = disabled ? -1 : 0; // mimic native