-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enter key behaviour #31
Comments
thank you for the note. I will look into this later. It is not readily apparent how you can bind these kind of methods from the component instantiation without the library knowing about them to begin with so I will have to implement them manually like I did for onBlur and onFocus. However, I have two solutions that might be able to work for you.
|
Hi Darren, |
* feat(listeners): added transparent wrappers and deprecated inputProps.onClick, onBlur, onFocus. users can now use native @keyup.tab @Focus @blur etc on root vue-autosuggest component to bind native events to the input. * docs(1.4.0): version bump, readme update * style(code): prettier semi and double quotes addedwq * packages(vue): upgraded packages vue, vue-test-utils etc. From #31 #34
@paulheijman you can now do |
Hi Darren, Thank you! |
Thanks so much for adding this, Darren! Question for Darren or Paul.... how do you fish out the value of the VueAutosuggest from within the function linked to @keyup.enter? |
Ah doh! Figured it out. It's bound to v-model. Amazing component, thank you Darren! |
First of all: thank you for a very useful component!
vue-autosuggest
version: 1.3.1node
version: 9.4.0npm
(oryarn
) version: 5.7.1Problem description:
I want to use the autosuggest as a searchbar and suggester works very nice, but when the user hits enter my search function isn't called despite the
@keyup.enter
Suggested solution:
It seems the enter key event is overridden in the component for selecting a value from the dropdown list. If the list is closed the override should be ignored.
The text was updated successfully, but these errors were encountered: