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

Different display options for array of objects #372

Open
JenyaPodi opened this issue Aug 19, 2022 · 1 comment
Open

Different display options for array of objects #372

JenyaPodi opened this issue Aug 19, 2022 · 1 comment

Comments

@JenyaPodi
Copy link

JenyaPodi commented Aug 19, 2022

I have several array of objects and need to apply different display options for them:

  1. One array needs to have editMode: "inline" and another one editMode: "dialog"
  2. One array needs to be to have all options for arrayOperations, another array has to have no arrayOperations(it is only to display info without ability to edit)

When setting functionality through options, they are applied to both arrays.
options: { context: { displayStatus: false }, summary: false, disableAll: false, markdownit: { html: true }, editMode: "inline", arrayOperations: [ "create", "update", "delete" ] }

Can you @albanm, please, point me how can I achieve desired functionality? Thank you

@dominikhorn93
Copy link

hi @JenyaPodi you can set specific x-options on each element that override the global options

{
          "type": "object",
          "properties": {
            "objectList": {
              "title": "Object-List",
              "type": "array",
              "x-options": {
                "editMode": "inline"
              },
              "items": {
                "type": "object",
                "properties": {}
              }
            }
          }
}

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

No branches or pull requests

2 participants