fix: adding a new child expands all childs

The refresh method is causing deep reload of parent node. Doesn't seem
like it's of any use here.

ref: https://github.com/frappe/frappe/pull/4805

This fix had side effect of expanding all parent node recursively.
This commit is contained in:
Ankush Menat 2021-12-13 22:28:38 +05:30
parent 1ec54c87c8
commit e089d6bafb
2 changed files with 1 additions and 1 deletions

View file

@ -299,7 +299,6 @@ frappe.ui.Tree = class {
.appendTo($toolbar);
$link.on('click', () => {
obj.click(node);
this.refresh();
});
});

View file

@ -242,6 +242,7 @@ frappe.views.TreeView = class TreeView {
frappe.model.rename_doc(me.doctype, node.label, function(new_name) {
node.$tree_link.find('a').text(new_name);
node.label = new_name;
me.tree.refresh();
});
},
btnClass: "hidden-xs"