You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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