javascript - ExtJS 6. Unable to add a node to a treepanel -
for reason, in extjs 6 cannot worked literally years previous versions of library. cannot add new node selected one. code have:
//tree.store.getrootnode().insertbefore(node, tree.store.getrootnode().firstchild); // ^^^ works. nodes added root selected.insertbefore(node, selected.firstchild); // ^^^ not work, though "selected" ordinary node // leaf = false if check "selected" node , "selected.firstchild", see expect see - normal nodes:
console.log(selected); // <-- see indeed node, selected console.log(selected.firstchild); // <-- it's ok.
when node added, parent remains collapsed. maybe that's why can't see it. try expanding parent node. example:
selected.insertbefore(node, selected.firstchild); selected.expand(); or maybe selected leaf node (not allowing children). have selected.set('leaf', false) please take @ this working fiddle
Comments
Post a Comment