From 225fda199c83505c76083890e333c18c83630b0f Mon Sep 17 00:00:00 2001 From: Zlash65 Date: Sat, 21 Apr 2018 13:40:45 +0530 Subject: [PATCH] minor user tags fix --- frappe/public/js/frappe/list/list_sidebar.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frappe/public/js/frappe/list/list_sidebar.js b/frappe/public/js/frappe/list/list_sidebar.js index 2615d22e0f..855316e935 100644 --- a/frappe/public/js/frappe/list/list_sidebar.js +++ b/frappe/public/js/frappe/list/list_sidebar.js @@ -468,15 +468,19 @@ frappe.views.ListSidebar = Class.extend({ .on("click", ".stat-link", function() { var fieldname = $(this).attr('data-field'); var label = $(this).attr('data-label'); - if (label == "No Tags") { - label = "%,%"; - } + var condition = "like"; var existing = me.list_view.filter_area.filter_list.get_filter(fieldname); if(existing) { existing.remove(); } - me.list_view.filter_area.filter_list.add_filter(me.list_view.doctype, fieldname, 'not like', label); - me.list_view.refresh(); + if (label == "No Tags") { + label = "%,%"; + condition = "not like"; + } + me.list_view.filter_area.filter_list.add_filter(me.list_view.doctype, fieldname, condition, label) + .then(function() { + me.list_view.refresh(); + }); }) .insertBefore(this.sidebar.find(".close-sidebar-button")); },