From 32ac7c8a3dc5bf501b04c1d4cd5c6c97bf911a2d Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Wed, 9 Apr 2025 12:13:18 +0000 Subject: [PATCH] Merged in fix/sw-2174-enter-click-should-select-radiocard (pull request #1768) SW-2174 Handle Enter press on RadioCard label * Handle Enter click on RadioCard label Approved-by: Linus Flood --- .../components/TempDesignSystem/Form/RadioCard/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx b/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx index 82b345c9f..e7377122f 100644 --- a/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx @@ -35,10 +35,19 @@ export default function RadioCard({ } } + function onKeyDown(event: React.KeyboardEvent) { + if (disabled) return + + if (event.key === "Enter") { + setValue(name, value) + } + } + return (