diff --git a/CHANGELOG.md b/CHANGELOG.md index 62a7027bbb..a1cb49fe72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ should change the heading of the (upcoming) version to include a major version b --> # 6.0.0-beta.15 +## @rjsf/core + +- Updated `ObjectField` `onPropertyChange` duplicating path if provided with only one path to fix [#4733](https://github.com/rjsf-team/react-jsonschema-form/issues/4733) + ## @rjsf/semantic-ui - Updated `ArrayField` to stop using `nanoid` and instead use `lodash/uniqueId` to fix [#4762](https://github.com/rjsf-team/react-jsonschema-form/issues/4726) diff --git a/packages/core/src/components/fields/ObjectField.tsx b/packages/core/src/components/fields/ObjectField.tsx index d054571e33..af09712240 100644 --- a/packages/core/src/components/fields/ObjectField.tsx +++ b/packages/core/src/components/fields/ObjectField.tsx @@ -1,28 +1,28 @@ -import { Component } from 'react'; import { - getTemplate, - getUiOptions, - orderProperties, + ADDITIONAL_PROPERTY_FLAG, + ANY_OF_KEY, ErrorSchema, FieldProps, FormContextType, GenericObjectType, + getTemplate, + getUiOptions, IdSchema, + ONE_OF_KEY, + orderProperties, + PROPERTIES_KEY, + REF_KEY, RJSFSchema, StrictRJSFSchema, TranslatableString, - ADDITIONAL_PROPERTY_FLAG, - PROPERTIES_KEY, - REF_KEY, - ANY_OF_KEY, - ONE_OF_KEY, } from '@rjsf/utils'; -import Markdown from 'markdown-to-jsx'; import get from 'lodash/get'; import has from 'lodash/has'; import isObject from 'lodash/isObject'; import set from 'lodash/set'; import unset from 'lodash/unset'; +import Markdown from 'markdown-to-jsx'; +import { Component } from 'react'; /** Type used for the state of the `ObjectField` component */ type ObjectFieldState = { @@ -80,7 +80,10 @@ class ObjectField