react-jsonschema-form v5.0.0-beta.1 Release Notes
-
Global changes across all themes:
- ๐ฆ Node 16 is now the default node engine for all packages, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2687)
- ๐จ Refactored all themes to use the new
@rjsf/utils
library functions and types - ๐จ Refactored the individual theme forms to consolidate
templates
as part of the fix for https://github.com/rjsf-team/react-jsonschema-form/issues/2526- All the work implementing the
BaseInputTemplate
should fix (https://github.com/rjsf-team/react-jsonschema-form/issues/2926, https://github.com/rjsf-team/react-jsonschema-form/issues/2889, https://github.com/rjsf-team/react-jsonschema-form/issues/2875, https://github.com/rjsf-team/react-jsonschema-form/issues/2223) - Also made the display of
title
anddescription
consistent across themes, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2481, https://github.com/rjsf-team/react-jsonschema-form/issues/2363, https://github.com/rjsf-team/react-jsonschema-form/issues/2219) - This change also ensures that all templates are properly exported, resolving (https://github.com/rjsf-team/react-jsonschema-form/issues/2365)
- All the work implementing the
- โฌ๏ธ Bumped most devDependencies to the latest versions where possible
- ๐ Switched all repos
package.json
andpackage-lock.json
files to be built and maintained by Node 16. - โ Adding button templates help to change text for buttons (https://github.com/rjsf-team/react-jsonschema-form/issues/2082, https://github.com/rjsf-team/react-jsonschema-form/issues/2357)
@rjsf/utils
- ๐ New package created by refactoring and converting to Typescript the
utils.js
file fromcore
into independent functions. - โก๏ธ Updated
types
fromcore
inutils
to better match the implementation across all themes- Included adding a bunch of new types for existing and new features
- The type updates should fix (https://github.com/rjsf-team/react-jsonschema-form/issues/2871, https://github.com/rjsf-team/react-jsonschema-form/issues/2673, https://github.com/rjsf-team/react-jsonschema-form/issues/2347, https://github.com/rjsf-team/react-jsonschema-form/issues/2186)
- Clear errors on
formData
change whenliveOmit=true
when "additionalProperties: false" issue 1507 (https://github.com/rjsf-team/react-jsonschema-form/pull/2631)
@rjsf/validator-ajv6
- ๐ New package created by refactoring and converting to Typescript the
validator.js
file fromcore
into independent functions as well as a class that implements the newValidatorType
interface. - โ Added support for customizing the options passed to the creation of the
ajv
instance. - ๐ฅ A BREAKING CHANGE to
toErrorList()
was made so that it takesfieldPath: string[]
rather thanfieldName='root'
as part of the fix to (https://github.com/rjsf-team/react-jsonschema-form/issues/1596)- The returned
errors
also now addsproperty
from thefieldPath
along with the proper path from theproperty
to thestack
message, making it consistent with the AJV errors. - Previously the
stack
attribute would sayroot: error message
; now it says. error message
- In addition, the extra information provided by AJV is no longer lost from the
errors
when merged with custom validation, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/1596).
- The returned
@rjsf/core
- Converted core to Typescript (https://github.com/rjsf-team/react-jsonschema-form/issues/583)
- ๐ป
ui:emptyValue
now works with selects (https://github.com/rjsf-team/react-jsonschema-form/issues/1041) - ๐จ Refactoring
utils.js
into the new@rjsf/utils
fixes (https://github.com/rjsf-team/react-jsonschema-form/issues/2719) - ๐ฅ BREAKING CHANGE Fix overriding core submit button className (https://github.com/rjsf-team/react-jsonschema-form/issues/2979)
- ๐ Fix
ui:field
with anyOf or oneOf no longer rendered twice (#2890) - ๐ฅ BREAKING CHANGE Fixed
anyOf
andoneOf
getting incorrect, potentially duplicate ids when combined with array (https://github.com/rjsf-team/react-jsonschema-form/issues/2197) - ๐
formContext
is now passed properly toSchemaField
, fixes (https://github.com/rjsf-team/react-jsonschema-form/issues/2394, https://github.com/rjsf-team/react-jsonschema-form/issues/2274) - โ Added
ui:duplicateKeySuffixSeparator
to customize how duplicate object keys are renamed when usingadditionalProperties
. - The
extraErrors
are now consistently appended onto the end of the schema validation-basederrors
information that is returned via theonErrors()
callback when submit fails.- In addition, the extra information provided by AJV is no longer stripped from the
errors
during the merge process, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/1596).
- In addition, the extra information provided by AJV is no longer stripped from the
- ๐ Fixed id generation for
RadioWidget
to no longer use random numbers fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2461) - Correctly call the
onChange
handler in the new set of props if it changed, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/1708). - ๐ Fixed race condition for
onChange
whenformData
is controlled prop, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/513),
@rjsf/antd
- ๐ Fix esm build to use
@rollup/plugin-replace
to replaceantd/lib
andrc-picker/lib
withantd/es
andrc-picker/es
respectively, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2962)
@rjsf/bootstrap-4
- Bootstrap-4
withTheme
customizations should work properly now (https://github.com/rjsf-team/react-jsonschema-form/issues/2058) - ๐จ
ArrayFieldTemplate
refactor seems to have fixed https://github.com/rjsf-team/react-jsonschema-form/issues/2775 - ๐ Fix issues with
SelectField
(https://github.com/rjsf-team/react-jsonschema-form/issues/2616, https://github.com/rjsf-team/react-jsonschema-form/issues/2875)
๐ป @rjsf/chakra-ui
- Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)
๐ป @rjsf/material-ui
- ๐ป The theme for Material UI version 5 (i.e.
@rjsf/mui
) was split out of the theme for version 4 (i.e.@rjsf/material-ui
) to resolve the following issues: - ๐ป Material-UI TextWidget now respects
inputType
in uiSchema (https://github.com/rjsf-team/react-jsonschema-form/issues/2057)- Also respects
step
fornumber
type (https://github.com/rjsf-team/react-jsonschema-form/issues/2488)
- Also respects
- ๐ป Material-UI UpDownWidget now support min/max/step (https://github.com/rjsf-team/react-jsonschema-form/issues/2022)
- Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)
- Select properly accepts true or false (https://github.com/rjsf-team/react-jsonschema-form/issues/2326)
@rjsf/mui
- ๐ป The theme for Material UI version 5 (i.e.
@rjsf/mui
) was split out of the theme for version 4 (i.e.@rjsf/material-ui
) to resolve the following issues: - ๐ป Material-UI TextWidget now respects
inputType
in uiSchema (https://github.com/rjsf-team/react-jsonschema-form/issues/2057)- Also respects
step
fornumber
type (https://github.com/rjsf-team/react-jsonschema-form/issues/2488)
- Also respects
- ๐ป Material-UI UpDownWidget now support min/max/step (https://github.com/rjsf-team/react-jsonschema-form/issues/2022)
- Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)
๐ป @rjsf/semantic-ui
- ๐ Fix missing error class on fields (https://github.com/rjsf-team/react-jsonschema-form/issues/2666)
- ๐ Fixed the
main
definition insemantic-ui
to fix (https://github.com/withastro/astro/issues/4357) - Properly handle the hidden field in this theme (https://github.com/rjsf-team/react-jsonschema-form/issues/2571)
๐ Dev / docs / playground
- ๐ป Demonstrate use of
ui:field
withanyOf
(#2890) - Playground now uses webpack 5
- 0๏ธโฃ Corrected number field default (https://github.com/rjsf-team/react-jsonschema-form/issues/2358)