Skip to content

Commit

Permalink
- Fixed a few small issues exposed by trying to use the playground in r…
Browse files Browse the repository at this point in the history
…jsf-team#2375

- Also updated the `CHANGELOG.md` to include all of the fixed issues
  • Loading branch information
heath-freenome committed Jan 21, 2023
1 parent d826c1a commit df49d1e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ should change the heading of the (upcoming) version to include a major version b
# 5.0.0-beta-18

# @rjsf/core
- Updated `MultiSchemaField` to utilize the new `getClosestMatchingOption()` and `sanitizeDataForNewSchema()` functions, fixing [#2944](https://github.com/rjsf-team/react-jsonschema-form/issues/2944), [#3236](https://github.com/rjsf-team/react-jsonschema-form/issues/3236), [#2978](https://github.com/rjsf-team/react-jsonschema-form/issues/2978), and probably others
- Updated `MultiSchemaField` to utilize the new `getClosestMatchingOption()` and `sanitizeDataForNewSchema()` functions, fixing the following issues:
- [#3236](https://github.com/rjsf-team/react-jsonschema-form/issues/3236)
- [#2978](https://github.com/rjsf-team/react-jsonschema-form/issues/2978)
- [#2944](https://github.com/rjsf-team/react-jsonschema-form/issues/2944)
- [#2202](https://github.com/rjsf-team/react-jsonschema-form/issues/2202)
- [#2183](https://github.com/rjsf-team/react-jsonschema-form/issues/2183)
- [#2086](https://github.com/rjsf-team/react-jsonschema-form/issues/2086)
- [#2069](https://github.com/rjsf-team/react-jsonschema-form/issues/2069)
- [#1661](https://github.com/rjsf-team/react-jsonschema-form/issues/1661)
- And probably others

# @rjsf/utils
- Added new `getClosestMatchingOption()`, `getFirstMatchingOption()` and `sanitizeDataForNewSchema()` schema-based utility functions
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/withTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export default function withTheme<
{ fields, widgets, templates, ...directProps }: FormProps<T, S, F>,
ref: ForwardedRef<Form<T, S, F>>
) => {
fields = { ...themeProps.fields, ...fields };
widgets = { ...themeProps.widgets, ...widgets };
fields = { ...themeProps?.fields, ...fields };
widgets = { ...themeProps?.widgets, ...widgets };
templates = {
...themeProps.templates,
...themeProps?.templates,
...templates,
ButtonTemplates: {
...themeProps?.templates?.ButtonTemplates,
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class Playground extends Component {
theme={theme}
select={this.onThemeSelected}
/>
{themes[theme].subthemes && (
{themes[theme] && themes[theme].subthemes && (
<SubthemeSelector
subthemes={themes[theme].subthemes}
subtheme={subtheme}
Expand Down

0 comments on commit df49d1e

Please sign in to comment.