Skip to content

Commit

Permalink
feat: 키보드 spacebar 선택
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Jun 9, 2024
1 parent fa807d7 commit e831b33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/wow-ui/src/components/RadioGroup/RadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(
(event: KeyboardEvent) => {
if (event.key === " ") {
setPressed(true);
if (!selected) {
group.value = value;
}
}
},
[setPressed]
[setPressed, group, value, selected]
);

const handleKeyUp = useCallback(
Expand Down

0 comments on commit e831b33

Please sign in to comment.