From 7fec4ab88bdecdde02291ff6d055f9af634bdc6b Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 29 Nov 2021 14:23:32 +0530 Subject: [PATCH] fix: search_box_id instead of search_box_class --- erpnext/e_commerce/product_ui/search.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/e_commerce/product_ui/search.js b/erpnext/e_commerce/product_ui/search.js index cfaf2cf109c..61922459e56 100644 --- a/erpnext/e_commerce/product_ui/search.js +++ b/erpnext/e_commerce/product_ui/search.js @@ -1,10 +1,10 @@ erpnext.ProductSearch = class { constructor(opts) { - /* Options: search_box_class (for custom search box) */ + /* Options: search_box_id (for custom search box) */ $.extend(this, opts); this.MAX_RECENT_SEARCHES = 4; - this.search_box_class = this.search_box_class || "#search-box"; - this.searchBox = $(this.search_box_class); + this.search_box_id = this.search_box_id || "#search-box"; + this.searchBox = $(this.search_box_id); this.setupSearchDropDown(); this.bindSearchAction(); @@ -27,7 +27,7 @@ erpnext.ProductSearch = class { // If click occurs outside search input/results, hide results. // Click can happen anywhere on the page $("body").on("click", (e) => { - let searchEvent = $(e.target).closest(this.search_box_class).length; + let searchEvent = $(e.target).closest(this.search_box_id).length; let resultsEvent = $(e.target).closest('#search-results-container').length; let isResultHidden = this.search_dropdown.hasClass("hidden");