Hi,
If I could allow only one leaf node at a time to be selected, that would be awesome. Here’s an example tree you can use:
[
{
"label": "Americas",
"value": "Americas",
"children": [
{
"label": "United States",
"value": "United States",
"children": [
{
"label": "Boston",
"value": "BOS"
},
{
"label": "Chicago",
"value": "CHI"
},
{
"label": "New York",
"value": "NYC"
},
{
"label": "San Francisco",
"value": "SFO"
},
{
"label": "Seattle",
"value": "SEA"
},
{
"label": "United States - Total",
"value": "USTOT"
}
]
}
]
},
{
"label": "Europe",
"value": "Europe",
"children": [
{
"label": "United Kingdom",
"value": "United Kingdom",
"children": [
{
"label": "Cambridge",
"value": "CMB"
},
{
"label": "London",
"value": "LDN"
},
{
"label": "Oxford",
"value": "OXF"
},
{
"label": "United Kingdom - Total",
"value": "UKTOT"
}
]
}
]
}
]
Having a metadata
property isn’t important, as I could put a json string into the value
property if necessary.
What would be really useful is to auto-generate an id
field on your end to make the nodes unique. Currently, (in my full tree of 2,500+ nodes) I had to fudge the label names of some nodes as they collided. E.g. the Singapore city node label needs to be made different from the Singapore country node label, because they have the same name of course. This would make it simpler to create trees with branches that have different views on the same set of nodes, e.g. viewing economic indicators by country > indicator or by indicator > country.
In summary:
- Configurable single node selection
- Use an
id
property to distinguish nodes (user-supplied or generated silently)
Thanks,
Arvindra
P.S. I raised a couple of issues on your GitHub repo.