Closed gaitat closed 2 years ago
I can confirm that a custom DescriptionField
supplied to the Form
component in the fields
prop is ignored and unused in the Bootstrap-4 variant.
I don't have a solution, but noticed that it does work when the type is object
instead of string
. I can reproduce this in @gaitat's sample by adding description: "test",
to the "custom fields demo" object and then commenting lines 27-29. This hides the description.
Duplicate of #2363
For semantic-ui I've fixed this issue in the following PR: https://github.com/rjsf-team/react-jsonschema-form/pull/2451
Bootstrap and material UI are doing the same thing where they aren't getting the description component from the registry.
Fixed in the v5 beta, see the 5.x migration guide
Prerequisites
Description
When I override DescriptionField in
core
then all works fine. When I override it inmaterial-ui
orbootstrap-4
then nothing happens.Steps to Reproduce
core
is enabled) and observe that all is fine.import Form from "@rjsf/core";
toimport Form from "@rjsf/material-ui";
orimport Form from "@rjsf/bootstrap-4";
Expected behavior
When I override DescriptionField in
material-ui
orbootstrap-4
and comment out lines 27-29 I expect not to see the description field being rendered.Actual behavior
The description field is still rendered when
material-ui
orbootstrap-4
is selected and lines 27-29 are commented out.What am I doing wrong?