diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js
index b6b92c2204e..d03b2a0b8fa 100644
--- a/erpnext/selling/page/point_of_sale/pos_item_selector.js
+++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js
@@ -231,6 +231,7 @@ erpnext.PointOfSale.ItemSelector = class {
$(this.item_group_field.awesomplete.ul).css("min-width", "unset");
+ this.hide_open_link_btn();
this.attach_clear_btn();
}
@@ -240,6 +241,10 @@ erpnext.PointOfSale.ItemSelector = class {
$filter_label.html(value ? __(value) : __("All Items"));
}
+ hide_open_link_btn() {
+ $(this.item_group_field.$wrapper.find(".btn-open")).css("display", "none");
+ }
+
attach_clear_btn() {
this.search_field.$wrapper.find(".control-input").append(
`
@@ -249,12 +254,24 @@ erpnext.PointOfSale.ItemSelector = class {
`
);
+ this.item_group_field.$wrapper.find(".link-btn").append(
+ `
+ ${frappe.utils.icon("close", "xs", "es-icon")}
+ `
+ );
+
this.$clear_search_btn = this.search_field.$wrapper.find(".link-btn");
+ this.$clear_item_group_btn = this.item_group_field.$wrapper.find(".btn-clear");
this.$clear_search_btn.on("click", "a", () => {
this.set_search_value("");
this.search_field.set_focus();
});
+
+ this.$clear_item_group_btn.on("click", () => {
+ $(this.item_group_field.$input[0]).val("").trigger("input");
+ this.item_group_field.set_focus();
+ });
}
set_search_value(value) {