mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-16 18:11:59 -05:00
Fixed an issue where destroy method is not present for the browser tree after React porting.
This commit is contained in:
1 parent
a4ef5ea48b
commit
c1ad7d81f4
1 file changed
+9
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user