-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Titles in refs are not incorporated when constructing allOf/oneOf/anyOf dropdowns #2016
Comments
Any pointers on how to fix this? |
@mr-bjerre I think you have to fix this line of code (https://github.com/rjsf-team/react-jsonschema-form/blob/master/packages/core/src/components/fields/MultiSchemaField.js#L135) so that it properly resolves |
I'm probably going to need some help with those netlify failing jobs. Not sure why they would be affected |
I think that's a bug with Netlify (i.e. something with mismatches with Node version) -- you can just ignore those jobs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you. |
Prerequisites
Description
If a
title
property is stored within a$ref
on anallOf
,oneOf
, oranyOf
schema, it is not used when constructing a dropdown select for that schema.Steps to Reproduce
You can see this in action here: https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6e30sInNjaGVtYSI6eyJ0eXBlIjoib2JqZWN0Iiwib25lT2YiOlt7IiRyZWYiOiIjL2NvbXBvbmVudHMvc2NoZW1hcy9DYXQifSx7InRpdGxlIjoiV29vZiIsIiRyZWYiOiIjL2NvbXBvbmVudHMvc2NoZW1hcy9Eb2cifV0sImNvbXBvbmVudHMiOnsic2NoZW1hcyI6eyJQZXQiOnsidHlwZSI6Im9iamVjdCIsInJlcXVpcmVkIjpbInBldF90eXBlIl0sInByb3BlcnRpZXMiOnsicGV0X3R5cGUiOnsidHlwZSI6InN0cmluZyJ9fSwiZGlzY3JpbWluYXRvciI6eyJwcm9wZXJ0eU5hbWUiOiJwZXRfdHlwZSJ9fSwiRG9nIjp7ImFsbE9mIjpbeyIkcmVmIjoiIy9jb21wb25lbnRzL3NjaGVtYXMvUGV0In0seyJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6eyJiYXJrIjp7InR5cGUiOiJib29sZWFuIn0sImJyZWVkIjp7InR5cGUiOiJzdHJpbmciLCJlbnVtIjpbIkRpbmdvIiwiSHVza3kiLCJSZXRyaWV2ZXIiLCJTaGVwaGVyZCJdfX19XX0sIkNhdCI6eyJ0aXRsZSI6Ik1lb3ciLCJ0eXBlIjoib2JqZWN0IiwiYWxsT2YiOlt7IiRyZWYiOiIjL2NvbXBvbmVudHMvc2NoZW1hcy9QZXQifSx7InR5cGUiOiJvYmplY3QiLCJwcm9wZXJ0aWVzIjp7Imh1bnRzIjp7InR5cGUiOiJib29sZWFuIn0sImFnZSI6eyJ0eXBlIjoiaW50ZWdlciJ9fX1dfX19fSwidWlTY2hlbWEiOnt9LCJ0aGVtZSI6ImRlZmF1bHQiLCJsaXZlU2V0dGluZ3MiOnsidmFsaWRhdGUiOmZhbHNlLCJkaXNhYmxlIjpmYWxzZSwib21pdEV4dHJhRGF0YSI6ZmFsc2UsImxpdmVPbWl0IjpmYWxzZX19
We have a
oneOf
with both entries in the array being loaded via a$ref
. One of them has atitle
alongside the$ref
in the array, while the other has atitle
in the$ref
schema. The one with the title alongside has its title represented in the dropdown, while the other has an option label of "Option 1".Expected behavior
Titles within a
$ref
should be incorporated into the dropdown option labels.Actual behavior
Title is not accessed within the
$ref
when constructing the dropdown.Version
Current HEAD
The text was updated successfully, but these errors were encountered: