How to expand the tree whose root is collapsed?

In the following snippet

var treeMap = {};

webix.ready(function () {

var tree = new webix.ui({
container: “tree”,
id: “tree”,
view: “tree”,
drag: true,
select: true,
multiselect: ‘level’,
data: [{id:111, value:“111”},
{id:222, value:“222”},
{id:333, value:“1333”}
]

});
tree.filter("#value#",“1”);
tree.filter("#value#","");
tree.open(111);

tree.add({id:325, value: “aaa”}, -1, 111);
tree.add({id: webix.uid(), value: “aaa”}, -1, 111);
tree.open(325);
tree.refresh();
});

But when i am doing tree.open(325) , code is not working since element 325 is not expanded. Any idea how to do that?

with above code, element 325 doesn’t have child items ( element 111 has two child items ), so you can’t open element 325 but you can open element 111

http://webix.com/snippet/36a81246

Be sure to use Webix 2.5.x, as older version has a bug for adding items after tree filtering.

My Bad i forgot to add this code:
tree.add({id:329, value: “abc”}, -1, 325);
So now inside 325 there is one node 329 now i want to open 325 … but since the root 111 is not in expanded state , the tree.open(325) is not working.

Please suggest something on this.

Here is my new code:

var tree = new webix.ui({
id: “tree”, view: “tree”, drag: true, select: true, multiselect: ‘level’, data: [{id:111, value:“111”}, {id:222, value:“222”}, {id:333, value:“1333”} ]

});

tree.filter("#value#",“1”); tree.filter("#value#","");
tree.add({id:325, value: “aaa”}, -1, 111);
tree.add({id: webix.uid(), value: “aaa”}, -1, 111);
tree.add({id:329, value: “abc”}, -1, 325);
tree.open(329);
tree.refresh();

Please update to the Webix 2.5.8, you will be able to use

tree.open(325, true); //open item 325 and all its parent items

Thanks maksim, i 'll try in webix 2.5.8 and let u know.