Skip to content

Initial expand  #12

@ghost

Description

Thank you for creating a simple and clear example that works!
I wanted the tree initially collapsed and defined expanded:false in $scope.options in the controller as follows:

$scope.options = {
            expanded: false,
            expandOnClick: true,  ...

but it didn't seem to have any effect, the tree was fully expanded initially.
I made a small change in \demo\dist\angular-tree-widget.js
and it worked, but I thought you might want to check it out.

//expanded all the nodes
    if (node.expanded === undefined && node.children != undefined) {
    // node.expanded = true;
    // dk changed to false
    node.expanded = false;
    }

Once again, thank you for a brilliant piece of work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions