Skip to content
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

Prefill Autocomplete #82

Open
molerat619 opened this issue Sep 12, 2019 · 2 comments
Open

Prefill Autocomplete #82

molerat619 opened this issue Sep 12, 2019 · 2 comments

Comments

@molerat619
Copy link

molerat619 commented Sep 12, 2019

We're using the v-model on our autocomplete, but for some reason it does not populate the autocomplete field with the according entry.

Shouldn't it just be a matter of putting the right value in the model and then the autocomplete shows the right entry?

Edit:

Here is a very simplified example, which already at this stage does not prefill the autocomplete field. And it doesn't matter if I make test be just the id or the whole object.

HTML:

<autocomplete :source="employees" v-model="test"></autocomplete>

JS:

...
data(){
    ...
    test: {id: 12, name: "test name"} // or just the id - no difference
    employees: [{id: 12, name: "test name"}],
    ...
}
@ceronem
Copy link

ceronem commented Dec 18, 2019

Same problem

@sbamniya
Copy link

Having the same problem.
+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants