open

opens the branch with the specified id

void open(id id, [boolean show] );
ididthe node id
showbooleanif true, opens all parent of the branch

Example

tree = webix.ui({
    view: "tree",
    data: [
        { id: "branch1", value: "The Shawshank Redemption", data: [
            { id: "1.1", value: "Part 1" },
            { id: "1.2", value: "Part 2" }
        ]},
        { id: "branch2", value: "The Godfather", data: [
            { id: "2.1", value: "Part 1" }
        ]}
    ]
}); 
 
tree.open("branch1");

Details

To learn when the open() call has completed loading dynamic data, you can set a promise in onDataRequest and check for it in onAfterOpen - see this example.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix web development library and page of javascript treemap product.