mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-26 10:40:19 -06:00
Fixed an issue where destroy method is not present for the browser tree after React porting.
This commit is contained in:
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
Block a user