react-checkbox-tree
react-checkbox-tree copied to clipboard
Feature request: option to sort the nodes
Hello,
I have an array like this:
["Africa/Abidjan", "Africa/Accra", "America/Argentina/Cordoba", "America/Argentina/Jujuy"]
I am able to convert it to an array of nodes:
[
{
label: "Africa",
value: "africa",
children: [
{
label: "Abidjan",
value: "abidjan"
},
{
label: "Accra",
value: "acrra"
}
]
},
{
label: "America",
value: "america",
children : ......
}
]
except that I loose the original order.
So it would be nice to have an option to sort the nodes by their label (as in jsTree
), or by an optional key order
.