Closed Thorski closed 6 years ago
@Thorski you can use arrays in arrays as long as the key names are unique, you could use a select (one of the dynamic select add-ons) which loads related level data if you know how many levels deep the user may go as well.
@Anthropic thank you for your answer, but I cannot figure out how to structure this. If you could provide a simple example I would greatly appreciate it. Thank you.
"titleMap": [
{
"value": "1",
"name": "Ohio",
"type": "select",
"children": [
{ "value": "2", "name": "Delaware" }
]
},
]
Can you give me an example of the data you want from the output and perhaps an example of the tree?
Did you take a look at external options, there is a state/city/suburb picker in the example: https://github.com/Anthropic/angular-schema-form-external-options
I had not looked at or seen the external options. Thank you. I have since wrapped ngx-tree-select in a custom widget and am using that.
Closing since you found a solution :)
Please re-open if you do not feel the question has been answered sufficiently.
what's your solution for angular2-json-schema-form to implement the cascades
@jasminecjc angular2-json-schema-form is an unrelated project.
Enhancement
Is it possible to make a cascading menu for selecting a value. Perhaps some array of arrays in titleMap?
Use case is user needs to pick a node in a large hierarchy of values.
@json-schema-form/angular-schema-form-lead