Unrecoverable error when nullable array is null
This is similar to #1300 however this issue specifically mentions nullable array type without default value
Empty array widget should render
Unrecoverable error
1.6.1
Would it be possible for you to add the JSONSchema/UISchema/formData values from your playground example? Your example crashes in the same way as an issue I'm currently observing, but I'm not sure if it is for the same reason (null form data for an array type field should probably be converted to an empty list) since the playground link fails to render. I want to fix the issue and I don't want to open a PR for your issue that addresses my problem and not yours. Thanks!
@amy-keibler
You can find the values by doing atob("eyJmb3JtRGF0YSI6eyJyZXF1ZXN0IjpudWxsfSwic2NoZW1hIjp7InR5cGUiOiJvYmplY3QiLCJwcm9wZXJ0aWVzIjp7InJlcXVlc3QiOnsidHlwZSI6WyJhcnJheSIsIm51bGwiXSwiaXRlbXMiOnsidHlwZSI6InN0cmluZyJ9fX19LCJ1aVNjaGVtYSI6e319")
to get
{"formData":{"request":null},"schema":{"type":"object","properties":{"request":{"type":["array","null"],"items":{"type":"string"}}}},"uiSchema":{}}
Also experiencing this problem. Proper JSON schema should allow this to be null or any array. I have tons of JSON files that have their field set to "null" but some have an array there. If I pull in the former, I get an error and it crashes.
also was able to reproduce this problem with the following data -
formData:
{ "tags": null }
schema:
{
"type": "object",
"properties": {
"tags": {
"type": [
"array",
"null"
],
"title": "Tags",
"items": {
"type": "string"
}
}
}
}
UI schema:
{
"ui:options": {
"orderable": false
},
"ui:emptyValue": []
}
in addition, seems like perhaps the form doesn't recognize null as a signal to apply the emptyValue UI property?
Most helpful comment
Also experiencing this problem. Proper JSON schema should allow this to be null or any array. I have tons of JSON files that have their field set to "null" but some have an array there. If I pull in the former, I get an error and it crashes.