Skip to content

destroyTree es6 function #977

@bharatpatil

Description

@bharatpatil

We can import a function to create a tree using es6 module like below:

import { createTree } from 'jquery.fancytree'

It will be helpful if we could also have a destoryTree function to destroy a fancytree instance.
e.g.
import { destroyTree } from 'jquery.fancytree'

Currently, I use following way to destroy a fancytree instance:

const tree = getTree('#' + scope.id);
if (tree.$container) {
tree.$container.fancytree('destroy');
} else {
tree.$div.fancytree('destroy');
}

Also please correct me if this approach of destroying seems fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions