github rjsf-team/react-jsonschema-form v5.20.0
5.20.0

latest releases: 5.21.1, v5.21.1, 5.21.0...
one month ago

New Features

  • Support to allow raising errors from custom widgets
  • Added support for overriding the labels for enums, anyOf and oneOf via the UiSchema

@rjsf/core

  • Support allowing raising errors from within a custom Widget #2718
  • Updated ArrayField, BooleanField and StringField to call optionsList() with the additional UiSchema parameter, fixing #4215 and #4260

@rjsf/utils

  • Updated the WidgetProps type to add es?: ErrorSchema<T>, id?: string to the params of the onChange handler function
  • Updated UIOptionsBaseType to add the new enumNames prop to support an alternate way to provide labels for enums in a schema, fixing #4215
  • Updated optionsList() to take an optional uiSchema that is used to extract alternate labels for enums or oneOf/anyOf in a schema, fixing #4215 and #4260
    • NOTE: The generics for optionsList() were expanded from <S extends StrictRJSFSchema = RJSFSchema> to <S extends StrictRJSFSchema = RJSFSchema, T = any, F extends FormContextType = any> to support the UiSchema.

Dev / docs / playground

  • Update the custom-widget-fields.md to add documentation for how to raise errors from a custom widget or field

Don't miss a new react-jsonschema-form release

NewReleases is sending notifications on new releases.