refactor: update listview URL on all refresh
Previous changes only made it refresh on change of filters, this change now updates URL ALWAYS. Co-Auhtored-By: Suraj Shetty <surajshetty3416@gmail.com>
This commit is contained in:
parent
90bcbe46f1
commit
61c895c2fc
3 changed files with 4 additions and 4 deletions
|
|
@ -291,6 +291,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
super.refresh().then(() => {
|
||||
this.render_header(refresh_header);
|
||||
this.update_checkbox();
|
||||
this.update_url_with_filters();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1454,7 +1455,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
|
||||
on_update() {}
|
||||
|
||||
on_filter_change() {
|
||||
update_url_with_filters() {
|
||||
window.history.replaceState(null, null, this.get_url_with_filters());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ frappe.views.KanbanView = class KanbanView extends frappe.views.ListView {
|
|||
} else {
|
||||
this.page.clear_indicator();
|
||||
}
|
||||
super.on_filter_change();
|
||||
}
|
||||
|
||||
save_kanban_board_filters() {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
this.menu_items = [];
|
||||
}
|
||||
|
||||
on_filter_change() {
|
||||
update_url_with_filters() {
|
||||
window.history.replaceState(null, null, this.get_url_with_filters());
|
||||
}
|
||||
|
||||
|
|
@ -506,7 +506,6 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
if (df.on_change) f.on_change = df.on_change;
|
||||
|
||||
df.onchange = () => {
|
||||
this.on_filter_change();
|
||||
this.refresh_filters_dependency();
|
||||
|
||||
let current_filters = this.get_filter_values();
|
||||
|
|
@ -681,6 +680,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
frappe.hide_progress();
|
||||
}).finally(() => {
|
||||
this.hide_loading_screen();
|
||||
this.update_url_with_filters();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue