Skip to content

Commit

Permalink
fix checked eval for controlled radio
Browse files Browse the repository at this point in the history
  • Loading branch information
jinkang-0 committed Jun 1, 2024
1 parent 54af926 commit a73beb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/RadioGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default function RadioGroup({
id={`${name}${o}`}
name={name}
value={`${name}${o}`}
checked={value ? value === `${name}${o}` : undefined}
defaultChecked={defaultValue === o}
checked={value ? value === o : undefined}
defaultChecked={defaultValue ? defaultValue === o : undefined}
onChange={() => handleChange(o)}
/>
{o}
Expand Down

0 comments on commit a73beb2

Please sign in to comment.