From 438b0eaab6b8c5b7534e51599c17559917a1f33a Mon Sep 17 00:00:00 2001 From: wdj-pascal Date: Mon, 18 Jun 2018 10:04:51 +0200 Subject: [PATCH] Emit selected object on Enter Changed the emit of the `enter` event, to also return the selected object (like the select() method). --- src/components/Autocomplete.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Autocomplete.vue b/src/components/Autocomplete.vue index 9c2c4b8..daad28c 100644 --- a/src/components/Autocomplete.vue +++ b/src/components/Autocomplete.vue @@ -412,7 +412,10 @@ export default { return } this.select(this.results[this.selectedIndex]) - this.$emit('enter', this.display) + this.$emit('enter', { + display: this.display, + selectedObject: this.results[this.selectedIndex] + }) }, /**