Merge pull request #34548 from akhilnarang/dont-show-empty-menu
fix: don't show empty menu in form view
This commit is contained in:
commit
5b21c0a43e
1 changed files with 5 additions and 1 deletions
|
|
@ -26,7 +26,11 @@ frappe.ui.form.Toolbar = class Toolbar {
|
|||
this.page.hide_menu();
|
||||
this.print_icon && this.print_icon.addClass("hide");
|
||||
} else {
|
||||
this.page.show_menu();
|
||||
if (this.page.menu.children().length > 0) {
|
||||
this.page.show_menu();
|
||||
} else {
|
||||
this.page.hide_menu();
|
||||
}
|
||||
this.print_icon && this.print_icon.removeClass("hide");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue