patternfly-bootstrap-treeview icon indicating copy to clipboard operation
patternfly-bootstrap-treeview copied to clipboard

Is there a way to rename tree node without reloading the whole tree?

Open JohnDoe2193 opened this issue 8 years ago • 2 comments

Is there a way to rename tree node (change text attribute) without reloading the whole tree or removing/adding the node? API methods don't seem to have anything like updateNode or renameNode.

JohnDoe2193 avatar Jun 20 '17 18:06 JohnDoe2193

yes:

      var sel = $('#tree').treeview(true).getSelected()[0];
      sel.text = folder_text;
      $('#tree').treeview(true).removeNode([]); // refresh hack

rhulha avatar Dec 21 '18 22:12 rhulha

yes:

      var sel = $('#tree').treeview(true).getSelected()[0];
      sel.text = folder_text;
      $('#tree').treeview(true).removeNode([]); // refresh hack

Not work :/

Uncaught TypeError: $(...).treeview(...).removeNode is not a function at :3:40

melouardi avatar Dec 09 '19 10:12 melouardi