From ee38653f72103b25a44253b7bb4f149f6e8252b7 Mon Sep 17 00:00:00 2001 From: Maxime Duchene-Savard Date: Fri, 15 Dec 2023 11:50:31 -0500 Subject: [PATCH] fix custom textfield --- src/components/autocomplete.vue | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/autocomplete.vue b/src/components/autocomplete.vue index aea2f54..446f580 100644 --- a/src/components/autocomplete.vue +++ b/src/components/autocomplete.vue @@ -41,17 +41,9 @@ const props = { export default { mounted() { - const _this = this this.$gmapApiPromiseLazy().then(() => { // get correct input from fallback or slot - let refInput = _this.$refs.input - if (_this.$slots.input) { - const refName = _this.$slots.input()[0].props.ref - const scopedInput = _this.$slots.input()[0].ref.i.ctx.$refs[refName] - if (scopedInput) { - refInput = scopedInput.$el.getElementsByTagName('input')[0] - } - } + let refInput = this.$el.nextElementSibling.getElementsByTagName('input')[0] if (this.selectFirstOnEnter) { downArrowSimulator(refInput) }