perf: lazy load sidebar stats

Sidebar stats take a huge time to load on large tables and it's not
required everytime you load the page. Best to only trigger it when user
clicks on "tags" (or other stats filter)

This is exactly how assignment and other filters work, so no need for
sidebar stats to work differently.
This commit is contained in:
Ankush Menat 2023-07-15 12:29:46 +05:30
parent 2ccab0d625
commit d171a6d30a

View file

@ -587,9 +587,6 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
</div>
`);
this.setup_new_doc_event();
if (this.list_view_settings && !this.list_view_settings.disable_sidebar_stats) {
this.list_sidebar && this.list_sidebar.reload_stats();
}
this.toggle_paging && this.$paging_area.toggle(true);
}