Skip to content
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

Introduce keep_empty_properties_by_default option to force display of ed... #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blabno
Copy link
Contributor

@blabno blabno commented Sep 18, 2014

Introduce keep_empty_properties_by_default option to force display of editors even for empty properties.

@sbellity
Copy link

sbellity commented Oct 8, 2014

👍

englercj added a commit to englercj/json-editor that referenced this pull request Jul 14, 2015
@englercj
Copy link
Contributor

While this does what you expect when generating the form, it adds unexpected behavior to the .getValue() method. Now all the blank fields that were not in the value have empty values on output. In that respect this key acts pretty much the same as required_by_default.

Instead, I would expect that fields that had no value on input and haven't changed have no json key on output with this property set. The required_by_default option would have them set because it considers them required fields, but this should not.

This is important for my application because the output of this form "inherits" values from a parent object. If the keys exist when I do .getValue() it will not inherit properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants