You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_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)
I had originally left off custom listeners because I usually see events passed as callback props, and @ left for native DOM events. I also borrowed much of my inspiration from react-autosuggest. However, I like this API, as it makes the component easier to tell which props are events. Should be an easy fix with backwards compatibility as you say. Thanks!
- chore(eslint) add eslint vue/recommended configuration and have
autosuggest lib conform
- chore(rollup) uglify esm module for smaller lib size
- chore(storybook) add story for suggestion event
- test(events) add tests for suggestion event/deprecation warnings
Fixes#58 From #62
vue-autosuggest
version: 1.5.0Relevant code or config
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 tothis.$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)The text was updated successfully, but these errors were encountered: