From ba5d5ef5d9816b427bf827bdb1e8d7106297ce80 Mon Sep 17 00:00:00 2001 From: Stuart MacKay Date: Tue, 24 Jul 2018 22:00:38 +0100 Subject: [PATCH 1/2] Added a ref directive to the input field. A ref directive was added to the input field to allow it to be referenced from outside the component, for example to set input focus. If a ref directive is added to the v-autocomplete component you can reference the input field inside the component like this: this.$refs['autocomplete'].$refs['input'].focus() where 'autocomplete' is the component ref and 'input' is the input field ref. A name of 'input' was used since it's obvious what it refers to and there are not other refs in the component thta it might clash with. --- src/Autocomplete.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Autocomplete.vue b/src/Autocomplete.vue index 2d8662c..fd37c19 100644 --- a/src/Autocomplete.vue +++ b/src/Autocomplete.vue @@ -1,7 +1,7 @@