I have 2 buttons present on a node :
i) Expand - which makes a REST call, and gets the child nodes for that particular node achieved using:
ii) Collapse - Which will delete the set of nodes we got in step (i).
In step 2 i am not able to delete the set of nodes shown in step 1.
How can we achieve the same ?
My diagram looks something like this :