Skip to content

Commit

Permalink
fix(report_view): allow exporting all rows even if count is disabled
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
(cherry picked from commit 4549c69)
  • Loading branch information
akhilnarang authored and mergify[bot] committed Apr 18, 2024
1 parent 3217204 commit c0cf52f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions frappe/public/js/frappe/views/reports/report_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1554,12 +1554,22 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
const selected_items = this.get_checked_items(true);

let extra_fields = null;
if (this.total_count > (this.count_without_children || args.page_length)) {
if (this.list_view_settings.disable_count) {
extra_fields = [
{
fieldtype: "Check",
fieldname: "export_all_rows",
label: __("Export All {0} rows?", [`<b>${this.total_count}</b>`]),
label: __("Export all matching rows?"),
},
];
} else if (
this.total_count > (this.count_without_children || args.page_length)
) {
extra_fields = [
{
fieldtype: "Check",
fieldname: "export_all_rows",
label: __("Export all {0} rows?", [`<b>${this.total_count}</b>`]),
},
];
}
Expand Down

0 comments on commit c0cf52f

Please sign in to comment.