ezraroi / ngJsTree

Angular Directive for the famous JS Tree
http://ezraroi.github.io/ngJsTree/
MIT License
270 stars 101 forks source link

Setting state is not reflected to nodes #101

Open sauliuni opened 7 years ago

sauliuni commented 7 years ago

Hello, i wanted to set state to hide for some nodes after certain events. Im using following callback function:

  vm.callbacl = function (nodes, str, res) {
    // Reset state for all elements
    _.each(vm.treeData, function (element, iteree) {
      element.text = "FSDFSD";// THIS LINE WORKS!
      element.state.hidden = true; // THIS NOT!
    });
  };

Somehow text property binding exists, but not for the state

sauliuni commented 7 years ago

I think it is blocked by https://github.com/vakata/jstree/issues/1644