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:
parent
1ec54c87c8
commit
e089d6bafb
2 changed files with 1 additions and 1 deletions
|
|
@ -299,7 +299,6 @@ frappe.ui.Tree = class {
|
|||
.appendTo($toolbar);
|
||||
$link.on('click', () => {
|
||||
obj.click(node);
|
||||
this.refresh();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue