-
Notifications
You must be signed in to change notification settings - Fork 89
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
Is there a way to make a request whenever I want? #23
Comments
Hi @AndreiaMatiasSilva, |
I have a case. [ When I key in So I want to |
I had a similar issue and implemented is follows: Added ref="autocomplete" to auto complete onSelect (obj) {
this.$nextTick(() => {
this.$refs.autocomplete.setValue(obj.Text)
this.$refs.autocomplete.showList = true
this.$refs.autocomplete.getData(obj.Text)
})
} Not pretty but it seems to work for me. |
Hi, @timberkeley Thanks for your help. I try to use your solution, but only works when use keyboard. Can't use on Finally, I use |
Hi @MingJen, |
Hi @BosNaufal, I want to use the selected result to query again. onSelect(selectInfo)
{
let refName = selectInfo.key;
setTimeout(() => {
let e = {
target: {value: selectInfo.name}
};
this.$refs[refName][0].handleInput(e);
}, 350);
} |
Hi @MingJen, so the flow will be: |
It would also be nice to use the 'value' props / emit 'input' to control the search term. I was going to do a pull request for this. That way you could just use v-model to control what you are searching for and also pick up the value typed if you want to use it directly, for a full search rather than a suggestion for example. I was going to do a pull request for this, time permitting. |
Hi @BosNaufal & @MingJen, You can reference a data value using: v-model="searchText" and then simply use: this.searchText = newText In the onSelect callback and the component should re-search for the new text. Please check it out to see if the solution is acceptable. Cheers, Tim |
I'm trying to make a request using
this.$refs.autocomplete.getData(string);
but the component does not react.
The text was updated successfully, but these errors were encountered: