mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -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);
|
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) {
|
next(item) {
|
||||||
if(item) {
|
if(item) {
|
||||||
let parent = this.parent(item);
|
let parent = this.parent(item);
|
||||||
|
Loading…
Reference in New Issue
Block a user