Decrease timeout to 400
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index d576406..e362db0 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -426,11 +426,16 @@
});
this.serach_item.make_input();
+
this.serach_item.$input.on("keypress", function (event) {
- if((me.serach_item.$input.val() != "") || (event.which == 13)){
- me.items = me.get_items();
- me.make_item_list();
- }
+
+ clearTimeout(me.last_search_timeout);
+ me.last_search_timeout = setTimeout(() => {
+ if((me.serach_item.$input.val() != "") || (event.which == 13)) {
+ me.items = me.get_items();
+ me.make_item_list();
+ }
+ }, 400);
});
this.search_item_group = this.wrapper.find('.search-item-group');