fix(UX): Show loading state while loading tags

This commit is contained in:
Ankush Menat 2023-07-15 12:54:08 +05:30
parent 5841f29610
commit 9a9705bd11

View file

@ -187,6 +187,10 @@ frappe.views.ListSidebar = class ListSidebar {
get_stats() {
var me = this;
let dropdown_options = me.sidebar.find(".list-stats-dropdown .stat-result");
this.set_loading_state(dropdown_options);
frappe.call({
method: "frappe.desk.reportview.get_sidebar_stats",
type: "GET",
@ -208,6 +212,14 @@ frappe.views.ListSidebar = class ListSidebar {
});
}
set_loading_state(dropdown) {
dropdown.html(`<li>
<div class="empty-state">
${__("Loading...")}
</div>
</li>`);
}
render_stat(stats) {
let args = {
stats: stats,