Hi everyone,
First of all, I would like to thank you for your component, it eases my programming life.
I have a JSON Schema built from a Java domain class with nested object properties at multiple levels.
I would like to know if it is possible to order nested properties (or fields) like in this following UI Schema:
{
"ui:order": [
"topField1",
"topField2",
...
],
"topField1": {
"ui:order": [
"nestedField1",
"nestedField2",
...
]
},
"nestedField1": {
"ui:order": [
"otherField1",
"otherField2",
...
]
}
}
In this case, fields within topField1 are well ordered, but not the fields in nestedField1.
Maybe I am doing something wrong!
Thank you for your help,
Pascal
I have this problem too.
Anyone knows how to set order for object properties? Thanks.
I tried to reorganize the properties, but that doesn't seem to help.
Provided this schema:
{
"title": "A registration form",
"description": "A simple form example.",
"type": "object",
"properties": {
"c": {"type": "string"},
"b": {"type": "string"},
"a": {
"type": "object",
"properties": {
"e": {"type": "string"},
"d": {"type": "string"}
}
}
}
}
Everything can be ordered just fine with this uiSchema:
{
"ui:order": [
"a",
"b",
"c"
],
"a": {
"ui:order": [
"d",
"e"
]
}
}
As I said, fields at first level are well ordered, like in the example above, but not "deeper" fields.
In my example above fields within a are ordered fine.
Ok I may just be tired, so could you please help me understanding the issue by providing a working example in jsfiddle? Here's the example from my previous comment https://jsfiddle.net/nox69jr3/1/
Thanks in advance for your help
I've updated your example: https://jsfiddle.net/nox69jr3/3/
As you can see the inner fields g,h and i are not ordered as expected.
You're not nesting at the right level https://jsfiddle.net/nox69jr3/4/
Can I close the issue?
That was so simple. I thought I had checked this way though.
Sorry for the time lost, and thank you for the good job. I close.
Most helpful comment
I have this problem too.
Anyone knows how to set order for object properties? Thanks.