Skip to content

Commit

Permalink
fix: disabled property of options in CheckboxesWidget and RadioWidget…
Browse files Browse the repository at this point in the history
… of antd theme
  • Loading branch information
KingMario committed Jun 12, 2024
1 parent ec932db commit a77fa34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/antd/src/widgets/CheckboxesWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function CheckboxesWidget<
id={optionId(id, i)}
name={id}
autoFocus={i === 0 ? autofocus : false}
disabled={Array.isArray(enumDisabled) && enumDisabled.indexOf(value) !== -1}
disabled={Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1}
value={String(i)}
>
{option.label}
Expand Down
2 changes: 1 addition & 1 deletion packages/antd/src/widgets/RadioWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSc
id={optionId(id, i)}
name={id}
autoFocus={i === 0 ? autofocus : false}
disabled={Array.isArray(enumDisabled) && enumDisabled.indexOf(value) !== -1}
disabled={Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1}
key={i}
value={String(i)}
>
Expand Down

0 comments on commit a77fa34

Please sign in to comment.