-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Empty array not being inserted with empty optional list field #2613
Comments
My temporary workaround is to put an empty default on a required field in the list. The user will have to delete the list entry if it's not needed. This is terrible for users to have to deal with, but by having, and then removing, the item in the list, it causes an empty value to remain after it's deleted and the file is saved. |
@freshyill |
Thanks! Has anyone come up with a better workaround in the meantime until this is merged? Or is what I'm doing pretty much it? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Related to #1407 |
Describe the bug
According to #1988 and #782, optional fields should be inserted as an empty string or array. An empty string is being inserted for optional string widgets, but this is not happening for list widgets.
To Reproduce
Use the config below and create a new page.
Expected behavior
A key with an empty array should be inserted for lists when no content is added.
Applicable Versions:
CMS configuration
Additional context
The text was updated successfully, but these errors were encountered: