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

Array in Array has no 'add' button unless #3891

Closed
4 tasks done
ldelaprade opened this issue Oct 2, 2023 · 1 comment
Closed
4 tasks done

Array in Array has no 'add' button unless #3891

ldelaprade opened this issue Oct 2, 2023 · 1 comment
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned

Comments

@ldelaprade
Copy link

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

A very simple schema, multiple 'models', each model can have multiple 'features'.
The top level array triggers an 'add' button, while for inner 'feature' array, you cannot add multiple values
{ "type": "object", "properties": { "models": { "type": "array", "items": { "type": "object", "properties": { "model": { "type": "string" }, "features": { "type": "array", "items": [ { "type": "string" } ] } } } } } }

You can workaround with defining embedded array with 'allOf'

"features": { "type": "array", "items": { "allOf": [ { "type": "string" } ] } }

Expected Behavior

"features": { "type": "array", "items": [ { "type": "string" } ] }

should be trigger same formulat as

"features": { "type": "array", "items": { "allOf": [ { "type": "string" } ] } }

Steps To Reproduce

No response

Environment

- OS:
- Node:
- npm:

Anything else?

No response

@ldelaprade ldelaprade added bug needs triage Initial label given, to be assigned correct labels and assigned labels Oct 2, 2023
@ldelaprade
Copy link
Author

actually,
"features": { "type": "array", "items": [ { "type": "string" } ] }
was not a good syntax...
should be
"features": { "type": "array", "items": { "type": "string" } }
and then bug disapears

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned
Projects
None yet
Development

No branches or pull requests

1 participant