From 2ce885397880ea9954cb29d58ec918a6a6eded2e Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Thu, 12 Aug 2021 17:10:51 -0400 Subject: [PATCH] infinite loop in product table (#1043) * infinite loop in product table * Show suggestions when input gets focus Co-authored-by: elsiosanchez --- src/components/ADempiere/Form/VPOS/ProductInfo/index.vue | 8 ++------ .../ADempiere/Form/VPOS/ProductInfo/productList.vue | 3 ++- src/lang/ADempiere/en.js | 3 ++- src/lang/ADempiere/es.js | 3 ++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/ADempiere/Form/VPOS/ProductInfo/index.vue b/src/components/ADempiere/Form/VPOS/ProductInfo/index.vue index 70f8b63b..9a612fac 100644 --- a/src/components/ADempiere/Form/VPOS/ProductInfo/index.vue +++ b/src/components/ADempiere/Form/VPOS/ProductInfo/index.vue @@ -47,8 +47,10 @@ clearable style="width: 100%;" popper-class="custom-field-prodcut-info" + :trigger-on-focus="true" :fetch-suggestions="localSearch" :select-when-unmatched="true" + :highlight-first-item="true" @shortkey.native="shortcutKeyMethod" @select="handleSelect" > @@ -162,12 +164,6 @@ export default { } }, localSearch(stringToMatch, callBack) { - if (this.isEmptyValue(stringToMatch)) { - // not show list - callBack([]) - return - } - let results = this.listWithPrice if (!this.isEmptyValue(stringToMatch)) { const parsedValue = stringToMatch.toLowerCase().trim() diff --git a/src/components/ADempiere/Form/VPOS/ProductInfo/productList.vue b/src/components/ADempiere/Form/VPOS/ProductInfo/productList.vue index 255e8cc7..b57b0211 100644 --- a/src/components/ADempiere/Form/VPOS/ProductInfo/productList.vue +++ b/src/components/ADempiere/Form/VPOS/ProductInfo/productList.vue @@ -37,8 +37,9 @@