-
-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Labels
Description
vue-autosuggest
version: 1.5.0
Relevant code or config
<vue-autosuggest
:suggestions="indicesToSuggestions(indices)"
:on-selected="selectHandler"
:input-props="{
style: 'width: 100%',
onInputChange: refine,
}"
/>
Problem description:
_onSelected
seems to be a fine abstraction, but it's more of a React pattern than a Vue pattern. For that I'd change that to this.$emit('selected', ...data)
. I'd do a PR but wasn't completely sure what the code all meant :)
Suggested solution:
change to an event for "selected"
(with backwards compatibility, like for the other events)
<vue-autosuggest
:suggestions="indicesToSuggestions(indices)"
@selected="selectHandler"
:input-props="{
style: 'width: 100%',
onInputChange: refine,
}"
/>