fix: Correct event for sidebar dropdown

- Click only gets called first time and not reliable next times
- Click will also get called when it's used for collapsing dropdown,
  which doesn't make sense here.
This commit is contained in:
Ankush Menat 2023-07-15 13:14:04 +05:30
parent 9a9705bd11
commit b2b0bb69bb

View file

@ -34,7 +34,7 @@ frappe.views.ListSidebar = class ListSidebar {
) {
this.sidebar.find(".list-tags").remove();
} else {
this.sidebar.find(".list-stats").on("click", (e) => {
this.sidebar.find(".list-stats").on("show.bs.dropdown", (e) => {
this.reload_stats();
});
}