Skip to content

Commit

Permalink
refactor: controlled 여부에 따라 함수 실행
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Jun 9, 2024
1 parent b17dcb1 commit 3466055
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/wow-ui/src/components/RadioGroup/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ const RadioGroup = ({

const handleChange = useCallback(
(event: ChangeEvent<HTMLInputElement>) => {
setSelected(event.target.value);
if (onChange) {
onChange(event);
}
onChange ? onChange(event) : setSelected(event.target.value);
},
[setSelected, onChange]
);
Expand Down

0 comments on commit 3466055

Please sign in to comment.