Commit 277f397
authored
Feature - Improve anyOf/oneOf rendering for optional data controls (rjsf-team#4804)
* Feature - Improve anyOf/oneOf rendering for optional data controls
Improved the `anyOf`/`oneOf` rendering for optional data controls
- In `@rjsf/core`, updated the `SchemaField` to optimize the `anyOf`/`oneOf` rendering along with hiding the label when there is no form data
- In `snapshots`, updated `formTests.tsx` a new `optionalArrayWithAnyofs` property to the schema along with removing the `uiSchema` override for `optionalObjectWithOneofs`
- Updated the snapshots in all of the themes accordingly
- In `playground`, made the same changes as in the `formTests.tsx` for the `optionalDataControls.ts` sample, moving the `experimental_defaultFormStateBehavior` into `liveSettings`
- Updated the `Sample` and `LiveSettings` types to support the `liveSettings` inside of a sample
- Updated the `Playground`'s `onSampleSelected` callback to merge any `liveSettings` in the sample on top of those already used in the playground
- Updated the `CHANGELOG.md` accordingly
* - Responded to reviewer feedback1 parent 174a188 commit 277f397
File tree
19 files changed
+19610
-18810
lines changed- packages
- antd/test/__snapshots__
- chakra-ui/test/__snapshots__
- core
- src/components/fields
- test/__snapshots__
- daisyui/test/__snapshots__
- fluentui-rc/test/__snapshots__
- mantine/test/__snapshots__
- mui/test/__snapshots__
- playground/src
- components
- samples
- primereact/test/__snapshots__
- react-bootstrap/test/__snapshots__
- semantic-ui/test/__snapshots__
- shadcn/test/__snapshots__
- snapshot-tests/src
19 files changed
+19610
-18810
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | 32 | | |
20 | 33 | | |
| |||
Large diffs are not rendered by default.
0 commit comments