This is the code sample that I am using in reactjs.
const node = graph.$(`#${selectedNode.id()}`);
graph.remove(node);
selectedNode.id is the id of the parent node but it deletes all the children nodes inside this parent node. How can I delete the parent node only and not its descendants?
This question is similar to this on here Remove/hide compound node without removing/hiding descendants but I will appreciate it if some code samples are provided because in the doc here http://js.cytoscape.org/#collection/graph-manipulation/eles.move we have a shallow code example of edges but I am interested in nodes.
Thanks