rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.39k stars 2.2k forks source link

[Semantic-ui] Field descriptions are not getting custom description rendering #2363

Closed ssbyoung closed 2 years ago

ssbyoung commented 3 years ago

Prerequisites

This is the SSCCE that shows this behavior. rjsf-description-issue.zip

Description

When providing a custom DescriptionField to the SemanticUI version of the form, it does not get parsed on field level descriptions.

Steps to Reproduce

  1. Use the @rjfs/semantic-ui form and pass in fields with a DescriptionField

Expected behavior

I would expect the description to go through my custom field.

Actual behavior

rjsf bug

Version

2.5.1 for both @rjsf/core and @rjsf/semantic-ui

trebor commented 3 years ago

i also see the same problem in material-UI:

import Form from "@rjsf/material-ui";

both <TitleField /> and <DescriptionField /> are properly used as i would expect at the top level of the from, but not in any of the form fields as they do work with @rjsf/core.

ssbyoung commented 3 years ago

@trebor I suspect that this affects all the themes, but I didn't check.

JonSilver commented 3 years ago

Duplicate of #2219

ssbyoung commented 3 years ago

I've fixed this in https://github.com/rjsf-team/react-jsonschema-form/pull/2451

I feel like the other themes are doing similar things where they are just displaying raw text and not using the registry to get the proper description component.

ssbyoung commented 2 years ago

In general I think #2591 was a better solution than what I came up with. Please get that PR out the door instead.

heath-freenome commented 2 years ago

Fixed in the v5 beta, see the 5.x migration guide