-
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
Removing properties from schema (as demonstrated in "conditional fields" example) does not remove field from rendered form #638
Comments
I guess it is because you are adding it if it is |
I didn't write the code, it's an example from https://github.com/mozilla-services/react-jsonschema-form#tips-and-tricks (so I presumed that it was meant to work as-is). The code example does actually remove them, but it does it by mutating the schema.properties instead of replacing it with a modified clone. https://jsfiddle.net/69z2wepo/83018/ is a working version of the original example. I would suggest that you guys update the example link to the fixed version. |
@LyraelRayne would you like to send a pull-request with that modification? |
I'm not really sure how to go about that (never done one on github). Do I have to make a fork or something? EDIT: Worked it out :) |
Quick question: Do I have to keep the fork around once the pull request is merged? |
Nope :) |
Thanks. That was all a lot less scary than it seemed ;) |
Prerequisites
Description
Removing a property from (a clone of) the schema does not remove the field from the form
Steps to Reproduce
Expected behavior
The name field should disappear
Actual behavior
The name field doesn't disappear
Version
0.49.0
The text was updated successfully, but these errors were encountered: