Skip to content

Schema groups / tabs / accordion #878

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

Closed
Schaussi opened this issue May 11, 2017 · 4 comments
Closed

Schema groups / tabs / accordion #878

Schaussi opened this issue May 11, 2017 · 4 comments

Comments

@Schaussi
Copy link

Hi,
I am using a quite huge schema, so I am looking for the best way to only display partial data, if possible without creating a separate form definition ([*]).
What I found so far is #800, unfortunately in my test project I only see a minimal button without any function.

Basically, I would like to give a schema object (e.g. myschema.myobject) a certain type like "x-form-schema" : { "type": "tabOrGroupOrAccordionEtc" }, so it would display all underlying items e.g. as tabpages.

Meanwhile, is there maybe a recommended way to achieve this behavior without having to create a separate form definition?

Thank you

@Anthropic
Copy link
Member

Anthropic commented May 12, 2017

json-schema is a standardised format, many elements in our form definition are not valid for the schema definition, but in the documentation there are details on how to add form definition rules to your schema through the x-schema-form container. You can also make an add-on without the need to make an entire decorator.

@Schaussi
Copy link
Author

Schaussi commented May 12, 2017

x-schema-form would be perfect for my case, but I think it is not possible to tell e.g. myschema.myobject to generate all its underlying objects (but only 1 level) as tabs, as you have to also specify the "tabs" and "items" properties.
It would be great if one could use the star symbol for certain parts of the schema in the form definition, like "myschema.myobject.[*]".
Unfortunately, I am too little expert in JS and Angular for creating an add-on I think, so probably I will write the complete form definition. Anyway, thank you for your hints.

Edit: Nevermind, found a solution which is working fine for me:

  • Create a form definition which only defines the tabs
  • As items, choose myschema.myobject.firstsubobject, for the next tab myschema.myobject.secondobject and so on

@Anthropic
Copy link
Member

So is this closable if you have a solution then?

@Schaussi
Copy link
Author

Yes, thank you.

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

No branches or pull requests

2 participants