Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,5 @@ out/
*.tsbuildinfo
lodashReplacer.js
muiReplacer.js
ajvReplacer.js

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
should change the heading of the (upcoming) version to include a major version bump.

-->
# 5.24.8

## @rjsf/antd

- Fixed the total disable of the `RadioWidget`, fixing [#4481](https://github.com/rjsf-team/react-jsonschema-form/issues/4481)

## @rjsf/validator-ajv8

- Fixed up the ESM build to properly handle ESM imports for `compileSchemaValidatorsCode()` by adding a new `ajvReplacer.ts` and using it

## Dev / docs / playground

- Updated `snapshot-tests` to add validation of disable `RadioWidget` via the `Form` prop as well as `uiSchema`

# 5.24.7

## Dev / docs / playground
Expand Down
220 changes: 220 additions & 0 deletions packages/antd/test/__snapshots__/Form.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3554,6 +3554,116 @@ exports[`single fields select field single choice enumDisabled using radio widge
</form>
`;

exports[`single fields select field single choice form disabled using radio widget 1`] = `
<form
className="rjsf"
noValidate={false}
onSubmit={[Function]}
>
<div
className="form-group field field-string"
>
<div
className="ant-form-item css-dev-only-do-not-override-1b0bdye"
>
<div
className="ant-row ant-form-item-row css-dev-only-do-not-override-1b0bdye"
style={
{
"rowGap": undefined,
}
}
>
<div
className="ant-col ant-col-24 ant-form-item-control css-dev-only-do-not-override-1b0bdye"
style={{}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<div
aria-describedby="root__error root__description root__help"
className="ant-radio-group ant-radio-group-outline css-dev-only-do-not-override-1b0bdye"
id="root"
onBlur={[Function]}
onFocus={[Function]}
>
<label
className="ant-radio-wrapper ant-radio-wrapper-disabled ant-radio-wrapper-in-form-item css-dev-only-do-not-override-1b0bdye"
style={{}}
>
<span
className="ant-radio ant-wave-target ant-radio-disabled"
>
<input
autoFocus={false}
checked={false}
className="ant-radio-input"
disabled={true}
id="root-0"
name="root"
onChange={[Function]}
type="radio"
value="0"
/>
<span
className="ant-radio-inner"
/>
</span>
<span>
foo
</span>
</label>
<label
className="ant-radio-wrapper ant-radio-wrapper-disabled ant-radio-wrapper-in-form-item css-dev-only-do-not-override-1b0bdye"
style={{}}
>
<span
className="ant-radio ant-wave-target ant-radio-disabled"
>
<input
autoFocus={false}
checked={false}
className="ant-radio-input"
disabled={true}
id="root-1"
name="root"
onChange={[Function]}
type="radio"
value="1"
/>
<span
className="ant-radio-inner"
/>
</span>
<span>
bar
</span>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button
className="ant-btn css-dev-only-do-not-override-1b0bdye ant-btn-submit"
disabled={true}
onClick={[Function]}
style={{}}
type="submit"
>
<span>
Submit
</span>
</button>
</form>
`;

exports[`single fields select field single choice formData 1`] = `
<form
className="rjsf"
Expand Down Expand Up @@ -3697,6 +3807,116 @@ exports[`single fields select field single choice formData 1`] = `
</form>
`;

exports[`single fields select field single choice uiSchema disabled using radio widget 1`] = `
<form
className="rjsf"
noValidate={false}
onSubmit={[Function]}
>
<div
className="form-group field field-string"
>
<div
className="ant-form-item css-dev-only-do-not-override-1b0bdye"
>
<div
className="ant-row ant-form-item-row css-dev-only-do-not-override-1b0bdye"
style={
{
"rowGap": undefined,
}
}
>
<div
className="ant-col ant-col-24 ant-form-item-control css-dev-only-do-not-override-1b0bdye"
style={{}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<div
aria-describedby="root__error root__description root__help"
className="ant-radio-group ant-radio-group-outline css-dev-only-do-not-override-1b0bdye"
id="root"
onBlur={[Function]}
onFocus={[Function]}
>
<label
className="ant-radio-wrapper ant-radio-wrapper-disabled ant-radio-wrapper-in-form-item css-dev-only-do-not-override-1b0bdye"
style={{}}
>
<span
className="ant-radio ant-wave-target ant-radio-disabled"
>
<input
autoFocus={false}
checked={false}
className="ant-radio-input"
disabled={true}
id="root-0"
name="root"
onChange={[Function]}
type="radio"
value="0"
/>
<span
className="ant-radio-inner"
/>
</span>
<span>
foo
</span>
</label>
<label
className="ant-radio-wrapper ant-radio-wrapper-disabled ant-radio-wrapper-in-form-item css-dev-only-do-not-override-1b0bdye"
style={{}}
>
<span
className="ant-radio ant-wave-target ant-radio-disabled"
>
<input
autoFocus={false}
checked={false}
className="ant-radio-input"
disabled={true}
id="root-1"
name="root"
onChange={[Function]}
type="radio"
value="1"
/>
<span
className="ant-radio-inner"
/>
</span>
<span>
bar
</span>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button
className="ant-btn css-dev-only-do-not-override-1b0bdye ant-btn-submit"
disabled={false}
onClick={[Function]}
style={{}}
type="submit"
>
<span>
Submit
</span>
</button>
</form>
`;

exports[`single fields slider field 1`] = `
<form
className="rjsf"
Expand Down
Loading