Fixed an issue where destroy method is not present for the browser tree after React porting.
parent
a4ef5ea48b
commit
c1ad7d81f4
|
|
@ -92,6 +92,15 @@ export class Tree {
|
|||
return await this.tree.create(item, data);
|
||||
}
|
||||
|
||||
async destroy() {
|
||||
const model = this.tree.getModel();
|
||||
this.rootNode.children = [];
|
||||
if (model.root) {
|
||||
model.root.isExpanded = false;
|
||||
await model.root.hardReloadChildren();
|
||||
}
|
||||
}
|
||||
|
||||
next(item) {
|
||||
if(item) {
|
||||
let parent = this.parent(item);
|
||||
|
|
|
|||
Loading…
Reference in New Issue