fix: Tree Report buttons state not matching initial_depth (#34505)
This commit is contained in:
parent
6aa02d9f3c
commit
b81939d1f2
1 changed files with 7 additions and 2 deletions
|
|
@ -2160,8 +2160,13 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
</div>
|
||||
</div>`);
|
||||
$(this.$report_footer).append(this.$tree_footer);
|
||||
this.$tree_footer.find("[data-action=collapse_all_rows]").show();
|
||||
this.$tree_footer.find("[data-action=expand_all_rows]").hide();
|
||||
if (this.report_settings.initial_depth == 0) {
|
||||
this.$tree_footer.find("[data-action=expand_all_rows]").show();
|
||||
this.$tree_footer.find("[data-action=collapse_all_rows]").hide();
|
||||
} else {
|
||||
this.$tree_footer.find("[data-action=collapse_all_rows]").show();
|
||||
this.$tree_footer.find("[data-action=expand_all_rows]").hide();
|
||||
}
|
||||
}
|
||||
|
||||
const message = __(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue