Merge pull request #4805 from pratu16x7/tree-fixes
[tree] refresh on rename
This commit is contained in:
commit
5a4e01be79
2 changed files with 5 additions and 2 deletions
|
|
@ -245,7 +245,10 @@ frappe.ui.Tree = class {
|
|||
.html(label)
|
||||
.addClass('tree-toolbar-button ' + (obj.btnClass || ''))
|
||||
.appendTo($toolbar);
|
||||
$link.on('click', () => { obj.click(node); return false; });
|
||||
$link.on('click', () => {
|
||||
obj.click(node);
|
||||
this.refresh();
|
||||
});
|
||||
});
|
||||
|
||||
return $toolbar;
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ frappe.views.TreeView = Class.extend({
|
|||
},
|
||||
click: function(node) {
|
||||
frappe.model.rename_doc(me.doctype, node.label, function(new_name) {
|
||||
node.tree_link.find('a').text(new_name);
|
||||
node.$tree_link.find('a').text(new_name);
|
||||
node.label = new_name;
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue