From a7172354534c88b58a4b77a7efc397e45280bea3 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 10 Oct 2023 20:51:09 +0200 Subject: [PATCH] Added `autofocus` support to `Autocomplete` element. --- .../http/webapp/src/components/elements/Autocomplete.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platypush/backend/http/webapp/src/components/elements/Autocomplete.vue b/platypush/backend/http/webapp/src/components/elements/Autocomplete.vue index 73f2c7286c..d63dc11551 100644 --- a/platypush/backend/http/webapp/src/components/elements/Autocomplete.vue +++ b/platypush/backend/http/webapp/src/components/elements/Autocomplete.vue @@ -52,6 +52,11 @@ export default { default: false, }, + autofocus: { + type: Boolean, + default: false, + }, + label: { type: String, }, @@ -194,6 +199,8 @@ export default { mounted() { document.addEventListener("click", this.onDocumentClick) + if (this.autofocus) + this.$refs.input.focus() }, }