Merge pull request #22760 from ankush/filters
fix(UX): Preserve filters between list and report views
This commit is contained in:
commit
33cd599356
2 changed files with 6 additions and 1 deletions
|
|
@ -40,6 +40,11 @@ frappe.views.ListViewSelect = class ListViewSelect {
|
|||
set_route(view, calendar_name) {
|
||||
const route = [this.slug(), "view", view];
|
||||
if (calendar_name) route.push(calendar_name);
|
||||
|
||||
let search_params = cur_list?.get_search_params();
|
||||
if (search_params) {
|
||||
frappe.route_options = Object.fromEntries(search_params);
|
||||
}
|
||||
frappe.set_route(route);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ frappe.ui.GroupBy = class {
|
|||
}
|
||||
|
||||
get_group_by_field_label() {
|
||||
let field = this.group_by_fields[this.group_by_doctype].find(
|
||||
let field = this.group_by_fields[this.group_by_doctype]?.find(
|
||||
(field) => field.fieldname == this.group_by_field
|
||||
);
|
||||
return field?.label || field?.fieldname;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue