treejs icon indicating copy to clipboard operation
treejs copied to clipboard

myTree.collapseAll is not a function

Open DarthSonic opened this issue 2 years ago • 1 comments

myTree.collapseAll is not a function

const myTree = new Tree(...);

myTree has no definition for collapseAll

DarthSonic avatar Nov 15 '22 13:11 DarthSonic

It seems that this functionality was removed in version 1.8.3. This version is available through npm but not uploaded here on Github. @daweilv Can you please update the repo to the latest version 1.8.3?

So far you can use

const treeGui = new Tree('#container', {
    data: treData,
    // only expand level 1 node
    closeDepth: 1,
});

as a replacement. See the sourcecode in npm package.

ch3sn3k avatar May 19 '23 07:05 ch3sn3k