Skip to content

Commit 5fb6e43

Browse files
committed
Control React Material radio group
Make sure that the React Material radio group is always rendered in controlled mode by handing over an empty string in case no value exists. This fixes an issue in which the control changed its mode once the selects a value.
1 parent 69441cd commit 5fb6e43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/material/src/controls/MaterialRadioGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const MaterialRadioGroup = (props: ControlProps & OwnPropsOfEnum) => {
9090
</FormLabel>
9191

9292
<RadioGroup
93-
value={props.data}
93+
value={props.data ?? ''}
9494
onChange={onChange}
9595
row={true}
9696
>

0 commit comments

Comments
 (0)