From 4368cf71c93ddb51e70728ce9617a58b592b7496 Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Thu, 28 Jan 2021 16:36:19 -0400 Subject: [PATCH] Add focus to Price Query (#576) * Add focus to Price Query * minimal change --- src/components/ADempiere/Form/PriceChecking/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/ADempiere/Form/PriceChecking/index.vue b/src/components/ADempiere/Form/PriceChecking/index.vue index 88f5e310..a7f8d21f 100644 --- a/src/components/ADempiere/Form/PriceChecking/index.vue +++ b/src/components/ADempiere/Form/PriceChecking/index.vue @@ -137,6 +137,9 @@ export default { }, mounted() { this.getImage() + setTimeout(() => { + this.focusProductValue() + }, 1000) }, beforeDestroy() { this.unsubscribe() @@ -171,7 +174,9 @@ export default { return imageBuffer }, focusProductValue() { - this.$refs.ProductValue[0].$children[0].$children[0].$children[1].$children[0].focus() + if (!this.isEmptyValue(this.$refs.ProductValue[0])) { + this.$refs.ProductValue[0].$children[0].$children[0].$children[1].$children[0].focus() + } }, formatPercent, formatPrice,