close of TreeAPI, Methods Webix Docs

StartAPI ReferenceMixinsTreeAPIMethods

closes the branch with the specified id

void close(id id);

id

idthe node id

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.close('branch1');

See also

  • API

  • Articles

  • Back to top