-
Notifications
You must be signed in to change notification settings - Fork 124
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
Input deleted after having one item selected #67
Comments
I have the same issue; I get the initial list from an API call, set the selected item but when I want to change the value, the first characters get deleted. on my getLabel method I have If I only put
Please some feedback @paliari :D |
If anyone has any solution to this please update,i'm also facing same issue. @paliari Please help |
Set |
I am facing this same issue - setting the item to null didn't affect anything. It seems the author has abandoned this project. UPDATE: What RomkaLTU was trying to say is that the object you bind to the control - what you set in the v-model attribute - that must be set to null in the data function of vue. This is because of how the first input change is handled. So to fix this, if your code is below it will work:
|
I am facing this same issue, ....
getLabel (item) {
return item == null ? '' : item.email;
},
.... it's work for me |
I think the reason is that when the v model is not null, anything we type will deleted and set the v model to become null. we can bypass it by setting the v-model to null after we select the suggestion, so it'll always accept the first character for example, I use the item-clicked event: on your javascript
I hope it help |
You can see this behaviour in the DEMO. It starts with one item selected. If you want to add any character, the input is deleted. this happens every time you have one item selected.
I your code starts with empty item, the first character is ignored.
The text was updated successfully, but these errors were encountered: