From 34660554cc1897a9c4273e4f7258e64d005755bf Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 9 Jun 2024 20:38:39 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20controlled=20=EC=97=AC=EB=B6=80?= =?UTF-8?q?=EC=97=90=20=EB=94=B0=EB=9D=BC=20=ED=95=A8=EC=88=98=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/wow-ui/src/components/RadioGroup/RadioGroup.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/wow-ui/src/components/RadioGroup/RadioGroup.tsx b/packages/wow-ui/src/components/RadioGroup/RadioGroup.tsx index 20ba3b1b..b6ffc51d 100644 --- a/packages/wow-ui/src/components/RadioGroup/RadioGroup.tsx +++ b/packages/wow-ui/src/components/RadioGroup/RadioGroup.tsx @@ -30,10 +30,7 @@ const RadioGroup = ({ const handleChange = useCallback( (event: ChangeEvent) => { - setSelected(event.target.value); - if (onChange) { - onChange(event); - } + onChange ? onChange(event) : setSelected(event.target.value); }, [setSelected, onChange] );