I have a tree component that I want to have the following functionality…
I want only one branch open at a time…so when the user expands the first branch it reveals all of its items inside that branch…then when the user chooses a second branch (without first closing the first branch) the first branch will collapse and only the new selected branch will have all of its items visible…I tried to store the nodes in an array, and then just close the node with array[index-1] but I cannot seem to be able to store the nodes, or even the index of the nodes in an array…are there any efficient way of doing this?