isFolder

defines whether an item should be rendered as a folder

function isFolder;

Deprecated

instead of it, you can set the icon property in the configuration of a tree item to render a tree item as a custom folder:

var tree = new dhx.Tree("tree", {
    data:[
        {
            "value": "Books",
            "id": "Books",
            "opened": true,
            "items": [
                {
                    "value": "Lawrence Block",
                    "id": "Lawrence Block",
                    "icon": {                         "folder": "fas fa-book",                         "openFolder": "fas fa-book-open",                         "file": "fas fa-file"                     }
                }
            ]
        },
        {
            "value": "Ian Rankin",
            "id": "Ian Rankin"
        }
    ]
}

Example

var tree = new dhx.Tree("tree", {isFolder: function() {
    return true;
}});

Related samples

Details

The config option can be used to create custom folders in a tree.

See also
Back to top