Skip to content

Commit aae38dc

Browse files
authored
Fix Material-UI inline checkboxes (rjsf-team#2038)
1 parent aa5a73a commit aae38dc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/material-ui/src/CheckboxesWidget/CheckboxesWidget.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const CheckboxesWidget = ({
6060
<FormLabel required={required} htmlFor={id}>
6161
{label || schema.title}
6262
</FormLabel>
63-
<FormGroup>
63+
<FormGroup row={!!inline}>
6464
{(enumOptions as any).map((option: any, index: number) => {
6565
const checked = value.indexOf(option.value) !== -1;
6666
const itemDisabled =
@@ -76,13 +76,7 @@ const CheckboxesWidget = ({
7676
onFocus={_onFocus}
7777
/>
7878
);
79-
return inline ? (
80-
<FormControlLabel
81-
control={checkbox}
82-
key={index}
83-
label={option.label}
84-
/>
85-
) : (
79+
return (
8680
<FormControlLabel
8781
control={checkbox}
8882
key={index}

0 commit comments

Comments
 (0)