-
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
Support dynamic presence of properties #522
Comments
That seems very complicated to implement properly and efficiently, no mention of maintainability. We usually recommend to process the schema when I'm closing for now, though if you're willing to work on this, feel free to reopen. |
I've recently implemented something like this using a custom field template. I've added additional entries to the
and then check them in the custom field rendering:
I apologize for the code, it really looks ugly so any improvements are more than welcome. |
This also looks related to #430, which is also closed until someone wants to implement it. |
@misto Where is the |
Prerequisites
Description
I would like a way to define a schema where some properties should be present if and only if another property has some value(s) and not present otherwise.
Steps to Reproduce
https://jsfiddle.net/07fm4n1b/
Expected behavior
react-jsonschema-form reacts to the "oneOf" array in the "dependencies" and intelligently displays only the relevant properties and when values change and some properties become relevant or no longer relevant they are shown or hidden appropriately.
Actual behavior
All of the properties are displayed requiring the user to understand which properties they need to fill and which ones they must leave blank.
Version
0.44.0
The text was updated successfully, but these errors were encountered: