fix(UX): Show loading state while loading tags
This commit is contained in:
parent
5841f29610
commit
9a9705bd11
1 changed files with 12 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue